tx · CvUE4n437vNpz8WGot6YeWfEMNqVvuJ8HEb4tWYdL788
3NBYuiC6eFv2jT8DptUfiMDTbhXgFvn7NcK: -0.04000000 Waves
2020.10.28 21:52 [1240861] smart account 3NBYuiC6eFv2jT8DptUfiMDTbhXgFvn7NcK > SELF 0.00000000 Waves
{
"type": 13,
"id": "CvUE4n437vNpz8WGot6YeWfEMNqVvuJ8HEb4tWYdL788",
"fee": 4000000,
"feeAssetId": null,
"timestamp": 1603911138215,
"version": 2,
"chainId": 84,
"sender": "3NBYuiC6eFv2jT8DptUfiMDTbhXgFvn7NcK",
"senderPublicKey": "BN5UNNa95ZrPJ8JGf9eweh6CLRZ618MuRsvqmxPX1yTR",
"proofs": [
"33fPfkpuRmmThyQ4bWWTHi2PnBnx7BSYRLkBRMayKpb2panQfzfCh3LDKz3SeTodHyNUBaLBcFurcWWWMhFfwti3"
],
"script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAgEAAAAHaXNPd25lcgAAAAEAAAAHYWRkcmVzcwkAAAAAAAACBQAAAAdhZGRyZXNzBQAAAAR0aGlzAQAAAA1nZXRIYXNoQW5zd2VyAAAAAAQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMCAAAAC2hhc2gtYW5zd2VyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAAAAAQAAAAFpAQAAAAlhZGRBbnN3ZXIAAAABAAAABkFuc3dlcgMJAQAAAAEhAAAAAQkBAAAAB2lzT3duZXIAAAABCAUAAAABaQAAAAZjYWxsZXIJAAACAAAAAQIAAAAhYWNjZXNzIG9ubHkgYnkgdGhlIGNvbnRyYWN0IG93bmVyBAAAAApoYXNoQW5zd2VyBQAAAAZBbnN3ZXIEAAAABnJld2FyZAgJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAAAAAZhbW91bnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAAC2hhc2gtYW5zd2VyBQAAAApoYXNoQW5zd2VyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAlhbnN3ZXJfaWQJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAApoYXNoQW5zd2VyAgAAAAdfcmV3YXJkBQAAAAZyZXdhcmQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAABnN0YXR1cwAAAAAAAAAAAAUAAAADbmlsAAAAAPPNPnc=",
"height": 1240861,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: XyFBof3CxkpZM7aWXPqdCXJHCX3P8rRoHuCT49iDdhd
Next: C2FfgmYiUbh4pdXCLCWekWp17f1sqavyJEJ9vancwkux
Diff:
Old | New | | Differences |
---|
21 | 21 | | else { |
---|
22 | 22 | | let hashAnswer = Answer |
---|
23 | 23 | | let reward = extract(i.payment).amount |
---|
24 | | - | WriteSet([DataEntry("hash-answer", hashAnswer), DataEntry("answer_id", toBase58String(i.transactionId)), DataEntry((hashAnswer + "_reward"), reward)]) |
---|
| 24 | + | WriteSet([DataEntry("hash-answer", hashAnswer), DataEntry("answer_id", toBase58String(i.transactionId)), DataEntry((hashAnswer + "_reward"), reward), DataEntry("status", 0)]) |
---|
25 | 25 | | } |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func isOwner (address) = (address == this) |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | func getHashAnswer () = { |
---|
8 | 8 | | let val = match getString(this, "hash-answer") { |
---|
9 | 9 | | case b: String => |
---|
10 | 10 | | b |
---|
11 | 11 | | case _ => |
---|
12 | 12 | | "" |
---|
13 | 13 | | } |
---|
14 | 14 | | val |
---|
15 | 15 | | } |
---|
16 | 16 | | |
---|
17 | 17 | | |
---|
18 | 18 | | @Callable(i) |
---|
19 | 19 | | func addAnswer (Answer) = if (!(isOwner(i.caller))) |
---|
20 | 20 | | then throw("access only by the contract owner") |
---|
21 | 21 | | else { |
---|
22 | 22 | | let hashAnswer = Answer |
---|
23 | 23 | | let reward = extract(i.payment).amount |
---|
24 | | - | WriteSet([DataEntry("hash-answer", hashAnswer), DataEntry("answer_id", toBase58String(i.transactionId)), DataEntry((hashAnswer + "_reward"), reward)]) |
---|
| 24 | + | WriteSet([DataEntry("hash-answer", hashAnswer), DataEntry("answer_id", toBase58String(i.transactionId)), DataEntry((hashAnswer + "_reward"), reward), DataEntry("status", 0)]) |
---|
25 | 25 | | } |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|