tx · HG1PD6hUQhGSeoQKJySa6boc9bMShjugY4eVwCWhPyGe
3MvMtJVYhV3GDKKFDnfD54nA8uYvoNfzQyM: -0.01000000 Waves
2020.10.14 21:31 [1220593] smart account 3MvMtJVYhV3GDKKFDnfD54nA8uYvoNfzQyM > SELF 0.00000000 Waves
{
"type": 13,
"id": "HG1PD6hUQhGSeoQKJySa6boc9bMShjugY4eVwCWhPyGe",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1602700320767,
"version": 2,
"chainId": 84,
"sender": "3MvMtJVYhV3GDKKFDnfD54nA8uYvoNfzQyM",
"senderPublicKey": "zx5FzJuL61niih4ohoYmKUkEUMQk3bW4jgtmYEztzuF",
"proofs": [
"3hcBFmh8mpNCTaCH5sboFcLT7jngS692vCKsxveeVDZuebNz11o1AkNMdrMwbHwmX9tM9o5vjpL36bRnd1RjgmRm"
],
"script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAHZGVwb3NpdAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAdNeVRva2VuAQAAACC8BnLNTH75zY/85pKTg3cOi9DRRgrZqRPS5vvLPGg8zQMJAQAAAAIhPQAAAAIJAQAAAAdleHRyYWN0AAAAAQgFAAAAA3BtdAAAAAdhc3NldElkBQAAAAdNeVRva2VuCQAAAgAAAAECAAAAIWNhbiBob2RsIHdhdmVzIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAAJbmV3QW1vdW50CQAAZAAAAAIFAAAADWN1cnJlbnRBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApjdXJyZW50S2V5BQAAAAluZXdBbW91bnQFAAAAA25pbAAAAAB4ahq4",
"height": 1220593,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: none
Next: none
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 | + | let MyToken = base58'DeyMK8USWs9ijzAXNy2azA3soajfrXjUNiJBdSJJsvMJ' |
---|
| 10 | + | if ((extract(pmt.assetId) != MyToken)) |
---|
| 11 | + | then throw("can hodl waves only at the moment") |
---|
| 12 | + | else { |
---|
| 13 | + | let currentKey = toBase58String(i.caller.bytes) |
---|
| 14 | + | let currentAmount = match getInteger(this, currentKey) { |
---|
| 15 | + | case a: Int => |
---|
| 16 | + | a |
---|
| 17 | + | case _ => |
---|
| 18 | + | 0 |
---|
| 19 | + | } |
---|
| 20 | + | let newAmount = (currentAmount + pmt.amount) |
---|
| 21 | + | WriteSet([DataEntry(currentKey, newAmount)]) |
---|
| 22 | + | } |
---|
| 23 | + | } |
---|
| 24 | + | |
---|
| 25 | + | |
---|