tx · 37Anb8QvrPwj2WK955XkYcTytMTSGwZhgVHCQA8oz2oz

3NB5N2sZzeeXumQavrLSnySaDhLEtAjDhoj:  -0.01400000 Waves

2019.11.03 06:27 [748156] smart account 3NB5N2sZzeeXumQavrLSnySaDhLEtAjDhoj > SELF 0.00000000 Waves

{ "type": 13, "id": "37Anb8QvrPwj2WK955XkYcTytMTSGwZhgVHCQA8oz2oz", "fee": 1400000, "feeAssetId": null, "timestamp": 1572751673178, "version": 1, "sender": "3NB5N2sZzeeXumQavrLSnySaDhLEtAjDhoj", "senderPublicKey": "J6uUrhmBcnvdu5KYxCr6uY5XoFb6bK1CdjWR8CMBst8o", "proofs": [ "28HDyHHt1i76BEm9G4Rg6Huzak3r9yi1csF3Z9qkoNyhF8VBThgoeRyr4kzcFW4x38Rz2qegj6tRbTcVjebDxyHi" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMIAQgAAAAIAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAACmdldEtleUl0ZW0AAAACAAAACHN1cHBsaWVyAAAABXRpdGxlCQABLAAAAAICAAAABWl0ZW1fCQACWAAAAAEJAAH3AAAAAQkAAZsAAAABCQABLAAAAAIFAAAACHN1cHBsaWVyBQAAAAV0aXRsZQEAAAASZ2V0S2V5SXRlbVN1cHBsaW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AAAAOZ2V0S2V5SXRlbURhdGEAAAABBQAAAARpdGVtBQAAAARkYXRhBQAAAANuaWwAAAAAaX+QDQ==", "chainId": 84, "height": 748156, "spentComplexity": 0 } View: original | compacted Prev: none Next: 64QhhJGYHYPmFcXTUp26MRAkwDDDmhfk2S7y3keG9BNJ Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let NONE = "none"
5+
6+func getNumberByKey (key) = {
7+ let num = match getInteger(this, key) {
8+ case a: Int =>
9+ a
10+ case _ =>
11+ 0
12+ }
13+ num
14+ }
15+
16+
17+func getStrByKey (key) = {
18+ let str = match getString(this, key) {
19+ case a: String =>
20+ a
21+ case _ =>
22+ NONE
23+ }
24+ str
25+ }
26+
27+
28+func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title)))))
29+
30+
31+func getKeyItemSupplier (item) = (item + "_owner")
32+
33+
34+func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item))
35+
36+
37+func getKeyItemPrice (item) = (item + "_price")
38+
39+
40+func getKeyItemData (item) = (item + "_data")
41+
42+
43+@Callable(i)
44+func addItem (title,price,data) = {
45+ let supplierAddress = toBase58String(i.caller.bytes)
46+ let item = getKeyItem(supplierAddress, title)
47+ if ((0 >= price))
48+ then throw("Valor de compra não pode ser inferior a 0")
49+ else if ((getValueItemSupplier(item) != NONE))
50+ then throw("O item já existe")
51+ else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)])
52+ }
53+
54+

github/deemru/w8io/169f3d6 
20.55 ms