tx · 3akqFTh4B5qTmNHAme837SxzyNQ4aySQC82KtVpw77cn
3MwRAf6E8QeMetxSyjH8sJYGpLiAFtDah9o: -0.01500000 Waves
2019.12.13 11:14 [806837] smart account 3MwRAf6E8QeMetxSyjH8sJYGpLiAFtDah9o > SELF 0.00000000 Waves
{
"type": 13,
"id": "3akqFTh4B5qTmNHAme837SxzyNQ4aySQC82KtVpw77cn",
"fee": 1500000,
"feeAssetId": null,
"timestamp": 1576224833588,
"version": 1,
"sender": "3MwRAf6E8QeMetxSyjH8sJYGpLiAFtDah9o",
"senderPublicKey": "HSS4a36erGkiV9CNwCE1pxUDtZ385xiKVPro36tziRHe",
"proofs": [
"579rWXR8rVmH73SjvQYuzsnrJsqhd4nyrHsty87ciXyCjkEjJdKDxF67bLa4Q4EnT4U16BHL1MhRqq48LVdNM6VA"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAAAAAAEAAAABaQEAAAAJZW50ZXJEYXRhAAAAAQAAAAdkYXRhVmFsBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAQQ29udGVudF9WYXJpYWJsZQUAAAAHZGF0YVZhbAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAKcG10LmFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAC3BtdC5hc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQCAAAABVdBVkVTBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAAAQAAACD0Ptklbetp3D3LwxAwfHwrn1zvwXtSIg3xoG2tDqDbPQcN3+Tu",
"chainId": 84,
"height": 806837,
"spentComplexity": 0
}
View: original | compacted
Prev: F2Jmc21uA66GUhfrwUsa6xj28LRcey1W7DcgbrS3am29
Next: EVGD4BLMAigusShkijdbeLCQpCaTvHaRqWGvs1hKzznm
Diff:
Old | New | | Differences |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func enterData (dataVal) = WriteSet([DataEntry("Content_Variable", dataVal)]) |
---|
8 | | - | |
---|
9 | | - | |
---|
10 | | - | |
---|
11 | | - | @Callable(i) |
---|
12 | | - | func getData () = { |
---|
13 | | - | let dataContent = match getString(this, "Content_Variable") { |
---|
14 | | - | case a: String => |
---|
15 | | - | a |
---|
16 | | - | case _ => |
---|
17 | | - | 0 |
---|
18 | | - | } |
---|
19 | | - | ScriptResult(WriteSet([DataEntry("Content_data", dataContent)]), TransferSet([ScriptTransfer(i.caller, 0, unit)])) |
---|
| 7 | + | func enterData (dataVal) = { |
---|
| 8 | + | let pmt = extract(i.payment) |
---|
| 9 | + | WriteSet([DataEntry("Content_Variable", dataVal), DataEntry("pmt.amount", pmt.amount), DataEntry("pmt.assetId", if (isDefined(pmt.assetId)) |
---|
| 10 | + | then toBase58String(value(pmt.assetId)) |
---|
| 11 | + | else "WAVES")]) |
---|
20 | 12 | | } |
---|
21 | 13 | | |
---|
22 | 14 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func enterData (dataVal) = WriteSet([DataEntry("Content_Variable", dataVal)]) |
---|
8 | | - | |
---|
9 | | - | |
---|
10 | | - | |
---|
11 | | - | @Callable(i) |
---|
12 | | - | func getData () = { |
---|
13 | | - | let dataContent = match getString(this, "Content_Variable") { |
---|
14 | | - | case a: String => |
---|
15 | | - | a |
---|
16 | | - | case _ => |
---|
17 | | - | 0 |
---|
18 | | - | } |
---|
19 | | - | ScriptResult(WriteSet([DataEntry("Content_data", dataContent)]), TransferSet([ScriptTransfer(i.caller, 0, unit)])) |
---|
| 7 | + | func enterData (dataVal) = { |
---|
| 8 | + | let pmt = extract(i.payment) |
---|
| 9 | + | WriteSet([DataEntry("Content_Variable", dataVal), DataEntry("pmt.amount", pmt.amount), DataEntry("pmt.assetId", if (isDefined(pmt.assetId)) |
---|
| 10 | + | then toBase58String(value(pmt.assetId)) |
---|
| 11 | + | else "WAVES")]) |
---|
20 | 12 | | } |
---|
21 | 13 | | |
---|
22 | 14 | | |
---|
23 | 15 | | @Verifier(tx) |
---|
24 | 16 | | func verify () = match tx { |
---|
25 | 17 | | case d: SetScriptTransaction => |
---|
26 | 18 | | sigVerify(tx.bodyBytes, tx.proofs[0], base58'HSS4a36erGkiV9CNwCE1pxUDtZ385xiKVPro36tziRHe') |
---|
27 | 19 | | case _ => |
---|
28 | 20 | | false |
---|
29 | 21 | | } |
---|
30 | 22 | | |
---|