tx · 6xan8T9sfQm8fbfTtbshPamxRYM1qRFqxdvbb29CCobg 3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7: -0.01000000 Waves 2023.07.15 18:31 [2667174] smart account 3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7 > SELF 0.00000000 Waves
{ "type": 13, "id": "6xan8T9sfQm8fbfTtbshPamxRYM1qRFqxdvbb29CCobg", "fee": 1000000, "feeAssetId": null, "timestamp": 1689435115645, "version": 2, "chainId": 84, "sender": "3N8Cko4wa6ewdnPRXybzTMDpnhuYREfkps7", "senderPublicKey": "4oVxBvsmoAhMaT1WhgSLcKFKX1NzwYxDaR89cAdGRGky", "proofs": [ "2YMJHQoPmtbaQS2x1JQc5fBvD82BPA1peghceg886zfqUjayLsV8cZAFguGqaNz98SGqWryiJ98fjKPJ9UXgKX3N" ], "script": "base64:BgIMCAISAwoBARIDCgEBBAAJa2V5UGllY2VzAgxzdGFrZWRQaWVjZXMADGtleUxhc3REZWx0YQIJbGFzdERlbHRhABRrZXlMYXN0Q3VyUGllY2VzUmVhZAIObGFzdFBpZWNlc1JlYWQBBWFzSW50AQF2BAckbWF0Y2gwBQF2AwkAAQIFByRtYXRjaDACA0ludAQBbgUHJG1hdGNoMAUBbgkAAgECFWZhaWwgdG8gY2FzdCBpbnRvIEludAIBaQEJc3Rha2VMYW5kAQZwaWVjZXMECWN1clBpZWNlcwkBC3ZhbHVlT3JFbHNlAgkAnwgBBQlrZXlQaWVjZXMAAAQJaW52UmVzdWx0CQEFYXNJbnQBCQD8BwQFBHRoaXMCC29uU3Rha2VMYW5kCQDMCAIFBnBpZWNlcwUDbmlsBQNuaWwJAJQKAgkAzAgCCQEMSW50ZWdlckVudHJ5AgUJa2V5UGllY2VzCQBkAgUJY3VyUGllY2VzBQZwaWVjZXMJAMwIAgkBDEludGVnZXJFbnRyeQIFFGtleUxhc3RDdXJQaWVjZXNSZWFkBQlpbnZSZXN1bHQFA25pbAUJaW52UmVzdWx0AWkBC29uU3Rha2VMYW5kAQZwaWVjZXMECWN1clBpZWNlcwkBC3ZhbHVlT3JFbHNlAgkAnwgBBQlrZXlQaWVjZXMAAAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQxrZXlMYXN0RGVsdGEFBnBpZWNlcwUDbmlsBQljdXJQaWVjZXMAcyG/pg==", "height": 2667174, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FzgUGdCvn3SfxRT5ceeuaehTZB4twWp5byShfSh912TY Next: EkdCbxSxbjkGJ7kWWU4fq5vGQj1iaXHUZpAgQKtNG2wZ Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let s = "{\"quoted\"}" | |
4 | + | let keyPieces = "stakedPieces" | |
5 | + | ||
6 | + | let keyLastDelta = "lastDelta" | |
7 | + | ||
8 | + | let keyLastCurPiecesRead = "lastPiecesRead" | |
9 | + | ||
10 | + | func asInt (v) = match v { | |
11 | + | case n: Int => | |
12 | + | n | |
13 | + | case _ => | |
14 | + | throw("fail to cast into Int") | |
15 | + | } | |
16 | + | ||
17 | + | ||
18 | + | @Callable(i) | |
19 | + | func stakeLand (pieces) = { | |
20 | + | let curPieces = valueOrElse(getInteger(keyPieces), 0) | |
21 | + | let invResult = asInt(invoke(this, "onStakeLand", [pieces], nil)) | |
22 | + | $Tuple2([IntegerEntry(keyPieces, (curPieces + pieces)), IntegerEntry(keyLastCurPiecesRead, invResult)], invResult) | |
23 | + | } | |
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | @Callable(i) | |
28 | + | func onStakeLand (pieces) = { | |
29 | + | let curPieces = valueOrElse(getInteger(keyPieces), 0) | |
30 | + | $Tuple2([IntegerEntry(keyLastDelta, pieces)], curPieces) | |
31 | + | } | |
5 | 32 | ||
6 | 33 |
github/deemru/w8io/169f3d6 29.81 ms ◑