tx · 5GNbT7h3gaPBinWFckTNM8GBEBdALCBHcRhpPg6hYtpG
3NBYuiC6eFv2jT8DptUfiMDTbhXgFvn7NcK: -0.04000000 Waves
2020.10.29 00:55 [1241046] smart account 3NBYuiC6eFv2jT8DptUfiMDTbhXgFvn7NcK > SELF 0.00000000 Waves
{
"type": 13,
"id": "5GNbT7h3gaPBinWFckTNM8GBEBdALCBHcRhpPg6hYtpG",
"fee": 4000000,
"feeAssetId": null,
"timestamp": 1603922115792,
"version": 2,
"chainId": 84,
"sender": "3NBYuiC6eFv2jT8DptUfiMDTbhXgFvn7NcK",
"senderPublicKey": "BN5UNNa95ZrPJ8JGf9eweh6CLRZ618MuRsvqmxPX1yTR",
"proofs": [
"2az5kDchwstS8UcVbqABt2jjZmr75rz7Tt2CBzDuTxEufikfQ6MdcjoyoU8cBJ5jm9ynYKJgJPM9gWyyXnJr5e6h"
],
"script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAAAgEAAAAHaXNPd25lcgAAAAEAAAAHYWRkcmVzcwkAAAAAAAACBQAAAAdhZGRyZXNzBQAAAAR0aGlzAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAAAAAQAAAAFpAQAAAAlhZGRBbnN3ZXIAAAABAAAABkFuc3dlcgQAAAANZ2V0SGFzaEFuc3dlcgkBAAAADmdldFN0cmluZ0J5S2V5AAAAAQIAAAALaGFzaC1hbnN3ZXIDCQEAAAABIQAAAAEJAQAAAAdpc093bmVyAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQAAAgAAAAECAAAAIWFjY2VzcyBvbmx5IGJ5IHRoZSBjb250cmFjdCBvd25lcgQAAAAKaGFzaEFuc3dlcgUAAAAGQW5zd2VyBAAAAAZyZXdhcmQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAALaGFzaC1hbnN3ZXIFAAAACmhhc2hBbnN3ZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAJYW5zd2VyX2lkCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAACmhhc2hBbnN3ZXICAAAAAV8JAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAIAAAAHX3Jld2FyZAgFAAAABnJld2FyZAAAAAZhbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADmNyZWF0ZWRfaGVpZ2h0BQAAAAZoZWlnaHQFAAAAA25pbAAAAABz3LQr",
"height": 1241046,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: C2FfgmYiUbh4pdXCLCWekWp17f1sqavyJEJ9vancwkux
Next: 7bkFHfHc94MT8Lfn5QTdd9oWUFPGauDaEmGiLzYyw65S
Diff:
Old | New | | Differences |
---|
14 | 14 | | then throw("access only by the contract owner") |
---|
15 | 15 | | else { |
---|
16 | 16 | | let hashAnswer = Answer |
---|
17 | | - | let reward = value(i.payments[0]) |
---|
| 17 | + | let reward = value(i.payments[1]) |
---|
18 | 18 | | [StringEntry("hash-answer", hashAnswer), StringEntry("answer_id", toBase58String(i.transactionId)), IntegerEntry((((hashAnswer + "_") + toBase58String(i.transactionId)) + "_reward"), reward.amount), IntegerEntry("created_height", height)] |
---|
19 | 19 | | } |
---|
20 | 20 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | func isOwner (address) = (address == this) |
---|
5 | 5 | | |
---|
6 | 6 | | |
---|
7 | 7 | | func getStringByKey (key) = valueOrElse(getString(this, key), "") |
---|
8 | 8 | | |
---|
9 | 9 | | |
---|
10 | 10 | | @Callable(i) |
---|
11 | 11 | | func addAnswer (Answer) = { |
---|
12 | 12 | | let getHashAnswer = getStringByKey("hash-answer") |
---|
13 | 13 | | if (!(isOwner(i.caller))) |
---|
14 | 14 | | then throw("access only by the contract owner") |
---|
15 | 15 | | else { |
---|
16 | 16 | | let hashAnswer = Answer |
---|
17 | | - | let reward = value(i.payments[0]) |
---|
| 17 | + | let reward = value(i.payments[1]) |
---|
18 | 18 | | [StringEntry("hash-answer", hashAnswer), StringEntry("answer_id", toBase58String(i.transactionId)), IntegerEntry((((hashAnswer + "_") + toBase58String(i.transactionId)) + "_reward"), reward.amount), IntegerEntry("created_height", height)] |
---|
19 | 19 | | } |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|