tx · HSYVFzV34PaNgjLoHcbziZ2Ag7A1ZHPuxjK9K1tJ4C2e
3MsJAaF5QnFSPWt1FbTYg2rZEYGE89zL9xm: -0.01400000 Waves
2019.08.20 19:25 [639690] smart account 3MsJAaF5QnFSPWt1FbTYg2rZEYGE89zL9xm > SELF 0.00000000 Waves
{
"type": 13,
"id": "HSYVFzV34PaNgjLoHcbziZ2Ag7A1ZHPuxjK9K1tJ4C2e",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1566318351043,
"version": 1,
"sender": "3MsJAaF5QnFSPWt1FbTYg2rZEYGE89zL9xm",
"senderPublicKey": "AuwNnJne9DDzFJMVzgSTvELEvJKcS6sAwa1pYot7NSZc",
"proofs": [
"W4LV8zxwahxbuwyBjNmfVu6zRpftV65ezUCCmWSMVqbcu2iz9G674UUv9yNChWTb7yoR52ji5xFih3jf9cNeGDy"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAEAAAAABVvd25lckFjY291bnRQdWJsaWNLZXkBAAAAIJNI3fVW+TejCob9DyZDLn5+jSuvds/LguFUOLKHWspvAQAAAApnZXRLZXlJdGVtAAAAAgAAAAhzdXBwbGllcgAAAAV0aXRsZQkAASwAAAACAgAAAAdpbmFydGVfCQACWAAAAAEJAAH3AAAAAQkAAZsAAAABCQABLAAAAAIFAAAACHN1cHBsaWVyBQAAAAV0aXRsZQEAAAAOZ2V0S2V5SXRlbURhdGEAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAFX2RhdGEBAAAAEmdldEtleUl0ZW1TdXBwbGllcgAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfb3duZXIAAAABAAAAAWkBAAAAB2FkZEl0ZW0AAAACAAAABXRpdGxlAAAABGRhdGEEAAAAD3N1cHBsaWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAARpdGVtCQEAAAAKZ2V0S2V5SXRlbQAAAAIFAAAAD3N1cHBsaWVyQWRkcmVzcwUAAAAFdGl0bGUJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAA9zdXBwbGllckFkZHJlc3MJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA5nZXRLZXlJdGVtRGF0YQAAAAEFAAAABGl0ZW0FAAAABGRhdGEFAAAAA25pbAAAAABqV6Ld",
"chainId": 84,
"height": 639690,
"spentComplexity": 0
}
View: original | compacted
Prev: 8H8QteSmi6mNKsETgEJ8e5BCiZomkNinpQ5ey827uAQ6
Next: 3YPmLn1ZchfX1d9Y68QTcjhazDSkWWeQV6FnDA2rSaMu
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ownerAccountPublicKey = base58'AuwNnJne9DDzFJMVzgSTvELEvJKcS6sAwa1pYot7NSZc' |
---|
5 | 5 | | |
---|
6 | | - | func getKeyItem (supplier,orderID) = ("INARTE_cert_" + toBase58String(sha256(toBytes((supplier + orderID))))) |
---|
| 6 | + | func getKeyItem (supplier,title) = ("inarte_" + toBase58String(sha256(toBytes((supplier + title))))) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | func getKeyItemData (item) = (item + "_data") |
---|
|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | 15 | | @Callable(i) |
---|
16 | | - | func addCertificato (orderID,data) = { |
---|
| 16 | + | func addItem (title,data) = { |
---|
17 | 17 | | 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)]) |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let ownerAccountPublicKey = base58'AuwNnJne9DDzFJMVzgSTvELEvJKcS6sAwa1pYot7NSZc' |
---|
5 | 5 | | |
---|
6 | | - | func getKeyItem (supplier,orderID) = ("INARTE_cert_" + toBase58String(sha256(toBytes((supplier + orderID))))) |
---|
| 6 | + | func getKeyItem (supplier,title) = ("inarte_" + toBase58String(sha256(toBytes((supplier + title))))) |
---|
7 | 7 | | |
---|
8 | 8 | | |
---|
9 | 9 | | func getKeyItemData (item) = (item + "_data") |
---|
10 | 10 | | |
---|
11 | 11 | | |
---|
12 | 12 | | func getKeyItemSupplier (item) = (item + "_owner") |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
15 | 15 | | @Callable(i) |
---|
16 | | - | func addCertificato (orderID,data) = { |
---|
| 16 | + | func addItem (title,data) = { |
---|
17 | 17 | | 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)]) |
---|
20 | 20 | | } |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|