tx · GQPKji6pCEFqktG9pUotKmFcHPyiXDLA9J2uuwNAs5rD

3MzrZiKenY9pri9uD2eGp5iCQNA9wTYZ51m:  -0.01400000 Waves

2019.10.10 09:09 [713367] smart account 3MzrZiKenY9pri9uD2eGp5iCQNA9wTYZ51m > SELF 0.00000000 Waves

{ "type": 13, "id": "GQPKji6pCEFqktG9pUotKmFcHPyiXDLA9J2uuwNAs5rD", "fee": 1400000, "feeAssetId": null, "timestamp": 1570687801011, "version": 1, "sender": "3MzrZiKenY9pri9uD2eGp5iCQNA9wTYZ51m", "senderPublicKey": "HzS33hv2PsQPjknCc13hFanBgwoWYUCA6zWDcrQCVfMN", "proofs": [ "4MYC8G864poLe24i1WzPW89SwdMRvZdfzZLntRooKr6H3K8pthyfq9UvrFFAt5R58RyBNNWyqzkMJtqwLPkAQkz6" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIICAAAAAQAAAAAFW93bmVyQWNjb3VudFB1YmxpY0tleQEAAAAgTPClO8uwZJTLnh0jMYjVB+SdXHwWj65qj0+lu/rFc1QBAAAACmdldEtleUl0ZW0AAAACAAAACHN1cHBsaWVyAAAABXRpdGxlCQABLAAAAAICAAAAB2luYXJ0ZV8JAAJYAAAAAQkAAfcAAAABCQABmwAAAAEJAAEsAAAAAgUAAAAIc3VwcGxpZXIFAAAABXRpdGxlAQAAAA5nZXRLZXlJdGVtRGF0YQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAVfZGF0YQEAAAASZ2V0S2V5SXRlbVN1cHBsaWVyAAAAAQAAAARpdGVtCQABLAAAAAIFAAAABGl0ZW0CAAAABl9vd25lcgAAAAEAAAABaQEAAAAHYWRkSXRlbQAAAAIAAAAFdGl0bGUAAAAEZGF0YQQAAAAPc3VwcGxpZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABGl0ZW0JAQAAAApnZXRLZXlJdGVtAAAAAgUAAAAPc3VwcGxpZXJBZGRyZXNzBQAAAAV0aXRsZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEmdldEtleUl0ZW1TdXBwbGllcgAAAAEFAAAABGl0ZW0FAAAAD3N1cHBsaWVyQWRkcmVzcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADmdldEtleUl0ZW1EYXRhAAAAAQUAAAAEaXRlbQUAAAAEZGF0YQUAAAADbmlsAAAAAKK1MSs=", "chainId": 84, "height": 713367, "spentComplexity": 0 } View: original | compacted Prev: AzzqKJkV9mtheQHTbStzM4MdLNF9fKDPsDBfdnsg8jVT Next: none Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerAccountPublicKey = base58'6BLpAChGdRexLHLegGnXtkjRnAdyj1iBPe5LVQjZtxaf'
55
6-func getKeyItem (supplier,orderID) = ((("INARTE_cert_" + orderID) + "_") + toBase58String(sha256(toBytes(supplier))))
6+func getKeyItem (supplier,title) = ("inarte_" + toBase58String(sha256(toBytes((supplier + title)))))
77
88
99 func getKeyItemData (item) = (item + "_data")
1313
1414
1515 @Callable(i)
16-func addCertificato (orderID,data) = {
16+func addItem (title,data) = {
1717 let supplierAddress = toBase58String(i.caller.bytes)
18- let item = getKeyItem(supplierAddress, orderID)
19- WriteSet([DataEntry(item, data)])
18+ let item = getKeyItem(supplierAddress, title)
19+ WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemData(item), data)])
2020 }
2121
2222
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerAccountPublicKey = base58'6BLpAChGdRexLHLegGnXtkjRnAdyj1iBPe5LVQjZtxaf'
55
6-func getKeyItem (supplier,orderID) = ((("INARTE_cert_" + orderID) + "_") + toBase58String(sha256(toBytes(supplier))))
6+func getKeyItem (supplier,title) = ("inarte_" + toBase58String(sha256(toBytes((supplier + title)))))
77
88
99 func getKeyItemData (item) = (item + "_data")
1010
1111
1212 func getKeyItemSupplier (item) = (item + "_owner")
1313
1414
1515 @Callable(i)
16-func addCertificato (orderID,data) = {
16+func addItem (title,data) = {
1717 let supplierAddress = toBase58String(i.caller.bytes)
18- let item = getKeyItem(supplierAddress, orderID)
19- WriteSet([DataEntry(item, data)])
18+ let item = getKeyItem(supplierAddress, title)
19+ WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemData(item), data)])
2020 }
2121
2222

github/deemru/w8io/169f3d6 
36.79 ms