tx · 8vSZhMVYor5ZbFVUfkxnzTwuu7unwBKQu9qS6QkSoD7b
3NCSUUm7nAFGsH6GPxDLxiQFgB1bvtn5BYq: -0.01000000 Waves
2023.01.07 18:39 [2394730] smart account 3NCSUUm7nAFGsH6GPxDLxiQFgB1bvtn5BYq > SELF 0.00000000 Waves
{
"type": 13,
"id": "8vSZhMVYor5ZbFVUfkxnzTwuu7unwBKQu9qS6QkSoD7b",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1673106041259,
"version": 2,
"chainId": 84,
"sender": "3NCSUUm7nAFGsH6GPxDLxiQFgB1bvtn5BYq",
"senderPublicKey": "CBPmcb8KZMwhakNhECGYzad54tQXotGdRSngabhoym36",
"proofs": [
"ekq6QBxJD2sJMyDJmv3anZzMyBCycybMZhyFVEEoa1VQJEegJNyNrFY1ucS5TdzN3KgQEQoscEZGhoFoMviPiU5"
],
"script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFjYW4gaG9kbCB3YXZlcyBvbmx5IGF0IHRoZSBtb21lbnQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAApjdXJyZW50S2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACW5ld0Ftb3VudAkAAGQAAAACBQAAAA1jdXJyZW50QW1vdW50CAUAAAADcG10AAAABmFtb3VudAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAKY3VycmVudEtleQUAAAAJbmV3QW1vdW50BQAAAANuaWwAAAAASAHY3A==",
"height": 2394730,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: none
Next: Eh4w7kajvoqxDsjdwzM2njedJm1aacTTVUcMR9CwzWLq
Full:
Old | New | | Differences |
---|
1 | | - | # no script |
---|
| 1 | + | {-# STDLIB_VERSION 3 #-} |
---|
| 2 | + | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
| 3 | + | {-# CONTENT_TYPE DAPP #-} |
---|
| 4 | + | |
---|
| 5 | + | |
---|
| 6 | + | @Callable(i) |
---|
| 7 | + | func deposit () = { |
---|
| 8 | + | let pmt = extract(i.payment) |
---|
| 9 | + | if (isDefined(pmt.assetId)) |
---|
| 10 | + | then throw("can hodl waves only at the moment") |
---|
| 11 | + | else { |
---|
| 12 | + | let currentKey = toBase58String(i.caller.bytes) |
---|
| 13 | + | let currentAmount = match getInteger(this, currentKey) { |
---|
| 14 | + | case a: Int => |
---|
| 15 | + | a |
---|
| 16 | + | case _ => |
---|
| 17 | + | 0 |
---|
| 18 | + | } |
---|
| 19 | + | let newAmount = (currentAmount + pmt.amount) |
---|
| 20 | + | WriteSet([DataEntry(currentKey, newAmount)]) |
---|
| 21 | + | } |
---|
| 22 | + | } |
---|
| 23 | + | |
---|
| 24 | + | |
---|