tx · FeBSPevjfCuVWiVBrejxVr6PcQbHCjVb6cLtnSpxK8s4

3N9ttyLcRwDo7L4EmJkbS3ZFuQJygivupsL:  -0.05000000 Waves

2023.06.09 18:35 [2615315] smart account 3N9ttyLcRwDo7L4EmJkbS3ZFuQJygivupsL > SELF 0.00000000 Waves

{ "type": 13, "id": "FeBSPevjfCuVWiVBrejxVr6PcQbHCjVb6cLtnSpxK8s4", "fee": 5000000, "feeAssetId": null, "timestamp": 1686324967190, "version": 2, "chainId": 84, "sender": "3N9ttyLcRwDo7L4EmJkbS3ZFuQJygivupsL", "senderPublicKey": "92ovWCy1Zf8CSsTLLLssC74m8yn5yPMqVp9fmVacou97", "proofs": [ "yupzhWaULJvxWc16oTE2NuVmtjo4hP8GwBWuxcv9Xzhg5rqXwVgux79inqVHifk5bYjkif7tQEXNCSVKA3hVszp" ], "script": "base64:BgISCAISAwoBCBIDCgEIEgQKAggIDAARQUlfVE9LRU5fQVNTRVRfSUQBIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAAtTVEFUVVNfT1BFTgIEb3BlbgASU1RBVFVTX0NIRUNLRURfT1VUAgtjaGVja2VkX291dAALU1RBVFVTX0RPTkUCBGRvbmUADkNIRUNLRURfT1VUX0JZAg9fY2hlY2tlZF9vdXRfYnkAE1NJTVBMRV9DSEFUR1BUX1RBU0sCE3NpbXBsZV9DaGF0R1BUX3Rhc2sAEENIRUNLX09VVF9IRUlHSFQCEV9jaGVja19vdXRfaGVpZ2h0AA9SRUdJU1RFUl9IRUlHSFQCEF9yZWdpc3Rlcl9oZWlnaHQADUNPTU1JVF9IRUlHSFQCDl9jb21taXRfaGVpZ2h0AQ9jYW5CZUNoZWNrZWRPdXQBBnRhc2tJZAQGc3RhdHVzCQCdCAIFBHRoaXMJAKwCAgUGdGFza0lkAgdfc3RhdHVzCQAAAgUGc3RhdHVzBQtTVEFUVVNfT1BFTgEOaXNDb3JyZWN0QWdlbnQCBnRhc2tJZAdhZ2Vud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FQ0tfT1VUX0hFSUdIVAUGaGVpZ2h0CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFBnRhc2tJZAIUX2NoZWNrX291dF90aW1lc3RhbXAFCXRpbWVzdGFtcAkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgICDW9wZW5fY2hhdGdwdF8FBnRhc2tJZAUDbmlsAWkBEWNvbW1pdENoYXRHUFRUYXNrAgZ0YXNrSWQIcmVzcG9uc2UED2NhbGxlclB1YmxpY0tleQkA2AQBCAUBaQ9jYWxsZXJQdWJsaWNLZXkEDGNvcnJlY3RBZ2VudAkBDmlzQ29ycmVjdEFnZW50AgUGdGFza0lkBQ9jYWxsZXJQdWJsaWNLZXkECXRpbWVzdGFtcAgFCWxhc3RCbG9jawl0aW1lc3RhbXADCQEBIQEFDGNvcnJlY3RBZ2VudAkAAgECQVRhc2sgbWF5IG9ubHkgYmUgc3VibWl0dGVkIGJ5IHRoZSBhZ2VudCB3aG8gY2hlY2tlZCB0aGUgdGFzayBvdXQhCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUGdGFza0lkAgdfc3RhdHVzBQtTVEFUVVNfRE9ORQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBnRhc2tJZAIHX3Jlc3VsdAUIcmVzcG9uc2UJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUGdGFza0lkBQ1DT01NSVRfSEVJR0hUBQZoZWlnaHQJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUGdGFza0lkAhFfY29tbWl0X3RpbWVzdGFtcAUJdGltZXN0YW1wBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V51YTrpg==", "height": 2615315, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: Vb4bt2cEZCpBbfWBBo37ezF39M18w31a8LzyFB2bBrr Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
5+
6+let b = "open"
7+
8+let c = "checked_out"
9+
10+let d = "done"
11+
12+let e = "_checked_out_by"
13+
14+let f = "simple_ChatGPT_task"
15+
16+let g = "_check_out_height"
17+
18+let h = "_register_height"
19+
20+let i = "_commit_height"
21+
22+func j (k) = {
23+ let l = getString(this, (k + "_status"))
24+ (l == b)
25+ }
26+
27+
28+func m (k,n) = {
29+ let o = getString(this, (k + e))
30+ (o == n)
31+ }
32+
33+
34+func p (q) = {
35+ let r = {
36+ let s = getString(this, (q + "_initializer"))
37+ if ($isInstanceOf(s, "String"))
38+ then {
39+ let t = s
40+ t
41+ }
42+ else ""
43+ }
44+ let s = getString(this, ((q + "_") + r))
45+ if ($isInstanceOf(s, "String"))
46+ then {
47+ let t = s
48+ t
49+ }
50+ else ""
51+ }
52+
53+
54+@Callable(u)
55+func registerChatGPTTask (v) = {
56+ let w = size(u.payments)
57+ if ((w != 1))
58+ then throw("Payment necessary!")
59+ else {
60+ let r = toBase58String(u.callerPublicKey)
61+ let q = toBase58String(u.transactionId)
62+ let x = u.payments[0]
63+ let y = x.amount
64+ let z = x.assetId
65+ let k = ((q + "_") + r)
66+ let A = lastBlock.timestamp
67+ if ((z != a))
68+ then throw("Payment only possible in the AI Token!")
69+ else if ((10000000 > y))
70+ then throw("Payment needs to be at least 0.1 AI Token!")
71+ else [StringEntry((k + "_description"), v), StringEntry((q + "_initializer"), r), StringEntry((k + "_status"), b), StringEntry((k + "_type"), f), IntegerEntry((k + h), height), IntegerEntry((k + "_register_timestamp"), A), BooleanEntry(("open_chatgpt_" + k), true)]
72+ }
73+ }
74+
75+
76+
77+@Callable(u)
78+func checkoutChatGPTTask (k) = {
79+ let r = toBase58String(u.callerPublicKey)
80+ let B = j(k)
81+ let A = lastBlock.timestamp
82+ if (!(B))
83+ then throw("Task not open for checkout!")
84+ else [StringEntry((k + e), r), StringEntry((k + "_status"), c), IntegerEntry((k + g), height), IntegerEntry((k + "_check_out_timestamp"), A), DeleteEntry(("open_chatgpt_" + k))]
85+ }
86+
87+
88+
89+@Callable(u)
90+func commitChatGPTTask (k,C) = {
91+ let r = toBase58String(u.callerPublicKey)
92+ let D = m(k, r)
93+ let A = lastBlock.timestamp
94+ if (!(D))
95+ then throw("Task may only be submitted by the agent who checked the task out!")
96+ else [StringEntry((k + "_status"), d), StringEntry((k + "_result"), C), IntegerEntry((k + i), height), IntegerEntry((k + "_commit_timestamp"), A)]
97+ }
98+
99+
100+@Verifier(E)
101+func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey)
102+

github/deemru/w8io/026f985 
16.31 ms