tx · DQJX64V29SxLC6KDsMZa2ddzVCQkjbhJ1EYiSWaM8fZZ

3MrxhgqwX2XDUTytfPdpqFwskTwvbPaEUXM:  -0.01400000 Waves

2019.07.03 14:14 [569156] smart account 3MrxhgqwX2XDUTytfPdpqFwskTwvbPaEUXM > SELF 0.00000000 Waves

{ "type": 13, "id": "DQJX64V29SxLC6KDsMZa2ddzVCQkjbhJ1EYiSWaM8fZZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1562152475672, "version": 1, "sender": "3MrxhgqwX2XDUTytfPdpqFwskTwvbPaEUXM", "senderPublicKey": "DQksuCGotFqvjzf483WL561VxA1t5Uiz4NKRDe7BgaJA", "proofs": [ "3SdcY4m6xNH4jnps513ZbGNDmD7Bnj9vmrLEiWXcWaGRg77oad3RRwTKZLZMu3jCzbFJZEz8B8GE9onFo377YjtY" ], "script": "base64:AAIDAAAAAAAAAAAAAAARAAAAAAROT05FAgAAAARub25lAAAAAAtCTEFDS0xJU1RFRAIAAAAJYmxhY2tsaXN0AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfcHJpY2UBAAAAEWdldFZhbHVlSXRlbVByaWNlAAAAAQAAAARpdGVtCQEAAAAOZ2V0TnVtY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1cHBsaWVyAAAAAQUAAAAEaXRlbQUAAAAETk9ORQkAAAIAAAABAgAAABhhbiBpdGVtIGlzIGFscmVhZHkgZXhpc3QDCQAAAAAAAAIFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAAtCTEFDS0xJU1RFRAkAAAIAAAABAgAAACdzdXBwbGllcidzIGFjY291bnQgaGFzIGJlZW4gYmxhY2tsaXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAA9zdXBwbGllckFkZHJlc3MJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABBQAAAARpdGVtBQAAAAVwcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADmdldEtleUl0ZW1EYXRhAAAAAQUAAAAEaXRlbQUAAAAEZGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAA9zdXBwbGllckFkZHJlc3MJAAEsAAAAAgUAAAARc3VwcGxpZXJ3aGl0ZWxpc3QCAAAABWhlbGxvBQAAAANuaWwAAAAAwOKcTg==", "chainId": 84, "height": 569156, "spentComplexity": 0 } View: original | compacted Prev: 3byzx1fyGkGCvAx723p58cv3bCpTpNsXyPz2YMZQQhcz Next: 4MYmdoRMHdkB7ZJau3VAGknALGhg92kkrDtBskELEqF2 Diff:
OldNewDifferences
8585 then throw("an item is already exist")
8686 else if ((supplierwhitelist == BLACKLISTED))
8787 then throw("supplier's account has been blacklisted")
88- else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data), DataEntry(getExtKeyItemWhiteListStatus(supplierAddress), supplierwhitelist)])
88+ else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data), DataEntry(getExtKeyItemWhiteListStatus(supplierAddress), (supplierwhitelist + "hello"))])
8989 }
9090
9191
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
55
66 let BLACKLISTED = "blacklist"
77
88 func getNumberByKey (key) = {
99 let num = match getInteger(this, key) {
1010 case a: Int =>
1111 a
1212 case _ =>
1313 0
1414 }
1515 num
1616 }
1717
1818
1919 func getStrByKey (key) = {
2020 let str = match getString(this, key) {
2121 case a: String =>
2222 a
2323 case _ =>
2424 NONE
2525 }
2626 str
2727 }
2828
2929
3030 func getKeyItemPrice (item) = (item + "_price")
3131
3232
3333 func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item))
3434
3535
3636 func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
3737
3838
3939 func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item))
4040
4141
4242 func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title)))))
4343
4444
4545 func getKeyItemData (item) = (item + "_data")
4646
4747
4848 func getKeyItemSupplier (item) = (item + "_owner")
4949
5050
5151 func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item))
5252
5353
5454 func getKeyBalanceSupplier (account) = (account + "_balance")
5555
5656
5757 func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account))
5858
5959
6060 func getExtAddressOracle () = extract(addressFromString("3N4sHbDeS1vHdESb7XPSXJeiUHgNZwMXZYo"))
6161
6262
6363 func getExtKeyItemWhiteListStatus (account) = (account + "_verifier_status")
6464
6565
6666 func getExtValueItemWhiteListStatus (oracle,account) = {
6767 let str = match getString(oracle, getExtKeyItemWhiteListStatus(account)) {
6868 case a: String =>
6969 account
7070 case _ =>
7171 NONE
7272 }
7373 str
7474 }
7575
7676
7777 @Callable(i)
7878 func addItem (title,price,data) = {
7979 let supplierAddress = toBase58String(i.caller.bytes)
8080 let item = getKeyItem(supplierAddress, title)
8181 let supplierwhitelist = getExtValueItemWhiteListStatus(getExtAddressOracle(), supplierAddress)
8282 if ((0 >= price))
8383 then throw("purchase amount cannot be less than item price")
8484 else if ((getValueItemSupplier(item) != NONE))
8585 then throw("an item is already exist")
8686 else if ((supplierwhitelist == BLACKLISTED))
8787 then throw("supplier's account has been blacklisted")
88- else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data), DataEntry(getExtKeyItemWhiteListStatus(supplierAddress), supplierwhitelist)])
88+ else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data), DataEntry(getExtKeyItemWhiteListStatus(supplierAddress), (supplierwhitelist + "hello"))])
8989 }
9090
9191

github/deemru/w8io/026f985 
40.98 ms