tx · 6DH8AbeFmx9bPHgTMnkFKU5QC9b86EkJ7uyaXhJtAvLq

3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys:  -0.01400000 Waves

2022.02.03 21:19 [1907773] smart account 3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys > SELF 0.00000000 Waves

{ "type": 13, "id": "6DH8AbeFmx9bPHgTMnkFKU5QC9b86EkJ7uyaXhJtAvLq", "fee": 1400000, "feeAssetId": null, "timestamp": 1643912378693, "version": 2, "chainId": 84, "sender": "3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys", "senderPublicKey": "HUBVsBcuExqVSbV3mSVhpdKfgihF2nwdtpGmpVLRwxEN", "proofs": [ "3EgZbGpP1tEGspBQpsdzMoLw3zpADL4Ydvi931P9aiiHg38XXmScnBtJyeLBMamBc96uU92u38YZN9Jac71XtQkw" ], "script": "base64:AAIFAAAAAAAAAb8IAhIDCgEIEgcKBQgBAQgIEgMKAQgSAwoBCBIDCgEIGgcKAUESAnR4GgsKAUISBnZlcmlmeRoJCgFhEgROT05FGg0KAWISCGN1c3RvbWVyGg0KAWMSCHN1cHBsaWVyGg8KAWQSCmVyaWNQdWJLZXkaEwoBZRIOZ2V0U3RyaW5nQnlLZXkaCAoBZhIDa2V5GgwKAWcSByRtYXRjaDAaBgoBaBIBYRoQCgFpEgtnZXRJdGVtSGFzaBoKCgFqEgV0aXRsZRoPCgFrEgpjb21ib1RpdGxlGg8KAWwSCmdldE5hbWVLZXkaCQoBbRIEdHlwZRoJCgFuEgRhZGRyGhcKAW8SEmdldEl0ZW1TdXBwbGllcktleRoJCgFwEgRpdGVtGhQKAXESD2dldEl0ZW1QcmljZUtleRoTCgFyEg5nZXRJdGVtRGF0YUtleRoZCgFzEhRnZXRWYWx1ZUl0ZW1TdXBwbGllchoMCgF0EgdpdGVtS2V5GgYKAXUSAWkaCgoBdhIFcHJpY2UaCgoBdxIFY291bnQaCQoBeBIEZGF0YRoKCgF5EgVvd25lchoUCgF6Eg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AAAACCAUAAAABdQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAAAWQJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAABZgUAAAADbmlsCQAAAgAAAAECAAAAHE9ubHkgRXJpYyBjYW4gZGVsZXRlIGVudHJpZXMAAAABdQEAAAAKdW5yZWdpc3RlcgAAAAEAAAABbQMDCQAAAAAAAAIFAAAAAW0FAAAAAWMGCQAAAAAAAAIFAAAAAW0FAAAAAWIEAAAAAW4JAAJYAAAAAQgIBQAAAAF1AAAABmNhbGxlcgAAAAVieXRlcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAABbAAAAAIFAAAAAW0FAAAAAW4FAAAAA25pbAkAAAIAAAABAgAAABBJbGxlZ2FsIGFyZ3VtZW50AAAAAQAAAAFBAQAAAAFCAAAAAAkAAfQAAAADCAUAAAABQQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAUEAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAABQQAAAA9zZW5kZXJQdWJsaWNLZXk58UtS", "height": 1907773, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 71TWFUbTC7vDhJocbg9cugcu1wf3fGbGKJkh8X6wQJ6A Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "NONE"
5+
6+let b = "CUSTOMER"
7+
8+let c = "SUPPLIER"
9+
10+let d = base58'8haEN2a7ZmkzawLmnr5rFX14X1oHi5kjt8NQUDNjSDLG'
11+
12+func e (f) = {
13+ let g = getString(f)
14+ if ($isInstanceOf(g, "String"))
15+ then {
16+ let h = g
17+ h
18+ }
19+ else a
20+ }
21+
22+
23+func i (c,j) = {
24+ let k = (c + j)
25+ ("item_" + toBase58String(sha256(toBytes(k))))
26+ }
27+
28+
29+func l (m,n) = (((m + "_") + n) + "_name")
30+
31+
32+func o (p) = (p + "_owner")
33+
34+
35+func q (p) = (p + "_price")
36+
37+
38+func r (p) = (p + "_data")
39+
40+
41+func s (p) = {
42+ let t = o(p)
43+ e(t)
44+ }
45+
46+
47+@Callable(u)
48+func register (m) = {
49+ let n = toBase58String(u.caller.bytes)
50+ if (if (isDefined(m))
51+ then if ((m == b))
52+ then true
53+ else (m == c)
54+ else false)
55+ then [StringEntry(l(m, n), n)]
56+ else throw("Invalid func parameters")
57+ }
58+
59+
60+
61+@Callable(u)
62+func createItem (j,v,w,x,y) = {
63+ let z = toBase58String(u.caller.bytes)
64+ let p = i(z, j)
65+ if ((0 >= v))
66+ then throw("Price can not be negative value or zero")
67+ else if ((s(p) != a))
68+ then throw("Item already exists")
69+ else [StringEntry(o(p), z), IntegerEntry(q(p), v), IntegerEntry(q(p), w), StringEntry(r(p), x)]
70+ }
71+
72+
73+
74+@Callable(u)
75+func deleteItem (j) = {
76+ let z = toBase58String(u.caller.bytes)
77+ let p = i(z, j)
78+ if ((s(p) != a))
79+ then [DeleteEntry(o(p)), DeleteEntry(q(p)), DeleteEntry(r(p))]
80+ else throw("No such item present")
81+ }
82+
83+
84+
85+@Callable(u)
86+func deleteEntry (f) = if ((u.callerPublicKey == d))
87+ then [DeleteEntry(f)]
88+ else throw("Only Eric can delete entries")
89+
90+
91+
92+@Callable(u)
93+func unregister (m) = if (if ((m == c))
94+ then true
95+ else (m == b))
96+ then {
97+ let n = toBase58String(u.caller.bytes)
98+[DeleteEntry(l(m, n))]
99+ }
100+ else throw("Illegal argument")
101+
102+
103+@Verifier(A)
104+func B () = sigVerify(A.bodyBytes, A.proofs[0], A.senderPublicKey)
105+

github/deemru/w8io/026f985 
16.52 ms