tx · 68ihjaaAahY2XytQLUGTa8A7Ksjhtxhc2JnfGB9qaTsP

3N81Dk1WuUv7UKt3inqWVYN81J8VHjoV3MC:  -0.01400000 Waves

2022.02.17 18:27 [1927792] smart account 3N81Dk1WuUv7UKt3inqWVYN81J8VHjoV3MC > SELF 0.00000000 Waves

{ "type": 13, "id": "68ihjaaAahY2XytQLUGTa8A7Ksjhtxhc2JnfGB9qaTsP", "fee": 1400000, "feeAssetId": null, "timestamp": 1645111675973, "version": 2, "chainId": 84, "sender": "3N81Dk1WuUv7UKt3inqWVYN81J8VHjoV3MC", "senderPublicKey": "5vXdNgZ1TR8AAzcnLumQTQYzcU3AwHj91bZTtiE3roBE", "proofs": [ "2NU4NGKRxv6JEB9B8zWczmcXzqiwjdmGNgm6rvdNV2L6rpR8QPmboSYotCiUJQvYdFayVWkBsdmsgm5Wm2iTdgZi" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMIAQgAAAAHAAAAAAROT05FAgAAAAROT05FAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAACmdldEtleUl0ZW0AAAACAAAACHN1cHBsaWVyAAAABXRpdGxlBAAAAA5zdXBwbGllclRpdHRsZQkAASwAAAACBQAAAAhzdXBwbGllcgUAAAAFdGl0bGUJAAEsAAAAAgIAAAAFaXRlbV8JAAJYAAAAAQkAAfcAAAABCQABmwAAAAEFAAAADnN1cHBsaWVyVGl0dGxlAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX293bmVyAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX3ByaWNlAQAA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AAAADgrOc2", "height": 1927792, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 27oWiqu31qw6PhgYKEt3iskg2NuFbxdp9hSFLzHjHJL5 Next: 9A72CE6ypn7Tn33KXBAL9zNEbydDtjGdE8svz76Ps7EE Diff:
OldNewDifferences
2020 func getKeyItemSupplier (item) = (item + "_owner")
2121
2222
23-func getKeyItemPrice (item) = (item + "_owner")
23+func getKeyItemPrice (item) = (item + "_price")
2424
2525
2626 func getKeyItemData (item) = (item + "_data")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "NONE"
55
66 func getStringByKey (key) = match getString(this, key) {
77 case a: String =>
88 a
99 case _ =>
1010 ""
1111 }
1212
1313
1414 func getKeyItem (supplier,title) = {
1515 let supplierTittle = (supplier + title)
1616 ("item_" + toBase58String(sha256(toBytes(supplierTittle))))
1717 }
1818
1919
2020 func getKeyItemSupplier (item) = (item + "_owner")
2121
2222
23-func getKeyItemPrice (item) = (item + "_owner")
23+func getKeyItemPrice (item) = (item + "_price")
2424
2525
2626 func getKeyItemData (item) = (item + "_data")
2727
2828
2929 func getValueItemSupplier (account) = match getString(this, account) {
3030 case a: String =>
3131 a
3232 case _ =>
3333 "NONE"
3434 }
3535
3636
3737 @Callable(i)
3838 func addItem (title,price,data) = {
3939 let supplierAddress = toBase58String(i.caller.bytes)
4040 let item = getKeyItem(supplierAddress, title)
4141 if ((0 >= price))
4242 then throw("Purchase amount cannot be less than item price")
4343 else if ((getValueItemSupplier(item) != NONE))
4444 then throw("An item is already exists")
4545 else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)])
4646 }
4747
4848

github/deemru/w8io/169f3d6 
26.68 ms