tx · 8FfhZKXNXG9SNHYDcsrANSKfKaSobwU281H5wQXSCBMo

3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV:  -0.05000000 Waves

2024.10.28 10:19 [3346412] smart account 3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV > SELF 0.00000000 Waves

{ "type": 13, "id": "8FfhZKXNXG9SNHYDcsrANSKfKaSobwU281H5wQXSCBMo", "fee": 5000000, "feeAssetId": null, "timestamp": 1730099969850, "version": 2, "chainId": 84, "sender": "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV", "senderPublicKey": "DS6HkopS9zypvxX6VhkdNvv6v4wcPZuChRvTwKJeacxE", "proofs": [ "xu3bE2WqLv157CaCJmXx9WVerfSCkWyz5msS4qAWFPsSS1ueuhy93svXwFTX1wy879WtejAZKJN1jdUSei7jf2X" ], "script": "base64:AAIFAAAAAAAAAA4IAhIECgIICBIECgIICAAAAAMAAAAAF0JBSV9DT05UUkFDVF9QVUJMSUNfS0VZAQAAACC4ub5WQ6dKmSY4XOD0ENHA5nSTpo3ZXmT/mOT2RZ2+BwAAAAAMQkFJX0NPTlRSQUNUAgAAACMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAAAAAMQkFJX0FTU0VUX0lEAQAAACCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgAAAAIAAAABaQEAAAAQZ2V0QW5zd2VyRm9yQ2hhdAAAAAIAAAAGY2hhdElkAAAAA2NpZAQAAAAQbnVtYmVyT2ZQYXltZW50cwkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwMJAQAAAAIhPQAAAAIFAAAAEG51bWJlck9mUGF5bWVudHMAAAAAAAAAAAEJAAACAAAAAQIAAAASUGF5bWVudCBuZWNlc3NhcnkhBAAAAAdwYXltZW50CQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAANmZWUIBQAAAAdwYXltZW50AAAABmFtb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AAAAByRtYXRjaDAJAAQiAAAAAQkAASwAAAACBQAAAAZjaGF0SWQCAAAACl9pbml0aWF0b3IDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwkAAAIAAAABAgAAABNObyBpbml0aWF0b3IgZm91bmQhBAAAAAl0aW1lc3RhbXAJAAGkAAAAAQgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACBQAAAAZjaGF0SWQCAAAAB19sYXRlc3QFAAAAA2NpZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIFAAAABmNoYXRJZAIAAAAHX3N0YXR1cwIAAAAEZG9uZQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAJcHVibGljS2V5AgAAAAFfBQAAAAZjaGF0SWQJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAADY2lkAgAAAAFfBQAAAAl0aW1lc3RhbXACAAAAAV8CAAAABGRvbmUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAGY2FsbGVyCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlly9qa", "height": 3346412, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DwHkFLxNsAVbSrHcoLTHD2XBxAJnuVUaeVi8iiL3kvA1 Next: GZtrLmwpweSUDTLzjPPuKXa8M8dQXoQUWpcnJChWEkaF Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'DS6HkopS9zypvxX6VhkdNvv6v4wcPZuChRvTwKJeacxE'
55
6-let b = addressFromPublicKey(a)
6+let b = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
77
88 let c = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
99
1717 let i = h.amount
1818 let j = h.assetId
1919 let k = {
20- let l = getInteger(b, "price_fullchatgpt")
20+ let l = getInteger(Address(fromBase58String(b)), "price_fullchatgpt")
2121 if ($isInstanceOf(l, "Int"))
2222 then {
2323 let m = l
3232 else {
3333 let n = toBase58String(d.callerPublicKey)
3434 let o = toString(lastBlock.timestamp)
35- let p = invoke(b, "registerTaskCallback", [f, "fullchatgpt", "callback"], [AttachedPayment(c, 10000000)])
35+ let p = invoke(Address(fromBase58String(b)), "registerTaskCallback", [f, "fullchatgpt", "callback"], [AttachedPayment(c, 10000000)])
3636 if ((p == p))
3737 then {
3838 let q = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'DS6HkopS9zypvxX6VhkdNvv6v4wcPZuChRvTwKJeacxE'
55
6-let b = addressFromPublicKey(a)
6+let b = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV"
77
88 let c = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
99
1010 @Callable(d)
1111 func getAnswerForChat (e,f) = {
1212 let g = size(d.payments)
1313 if ((g != 1))
1414 then throw("Payment necessary!")
1515 else {
1616 let h = d.payments[0]
1717 let i = h.amount
1818 let j = h.assetId
1919 let k = {
20- let l = getInteger(b, "price_fullchatgpt")
20+ let l = getInteger(Address(fromBase58String(b)), "price_fullchatgpt")
2121 if ($isInstanceOf(l, "Int"))
2222 then {
2323 let m = l
2424 m
2525 }
2626 else 0
2727 }
2828 if (if ((j != c))
2929 then true
3030 else (k > i))
3131 then throw("Payment of the minimal BAI amount necessary!")
3232 else {
3333 let n = toBase58String(d.callerPublicKey)
3434 let o = toString(lastBlock.timestamp)
35- let p = invoke(b, "registerTaskCallback", [f, "fullchatgpt", "callback"], [AttachedPayment(c, 10000000)])
35+ let p = invoke(Address(fromBase58String(b)), "registerTaskCallback", [f, "fullchatgpt", "callback"], [AttachedPayment(c, 10000000)])
3636 if ((p == p))
3737 then {
3838 let q = {
3939 let l = p
4040 if ($isInstanceOf(l, "String"))
4141 then {
4242 let r = l
4343 r
4444 }
4545 else throw("Unknown task id!")
4646 }
4747 [StringEntry((e + "_latest"), f), StringEntry((e + "_status"), "waiting"), StringEntry(q, e), StringEntry(((n + "_") + e), ((((f + "_") + o) + "_") + "waiting")), StringEntry((e + "_initiator"), n)]
4848 }
4949 else throw("Strict value is not equal to itself.")
5050 }
5151 }
5252 }
5353
5454
5555
5656 @Callable(d)
5757 func callback (q,f) = if ((d.callerPublicKey != a))
5858 then throw("Only BAI Contract is allowed to call the callback!")
5959 else {
6060 let e = {
6161 let l = getString(q)
6262 if ($isInstanceOf(l, "String"))
6363 then {
6464 let r = l
6565 r
6666 }
6767 else throw("Chat ID for task id not found!")
6868 }
6969 let n = {
7070 let l = getString((e + "_initiator"))
7171 if ($isInstanceOf(l, "String"))
7272 then {
7373 let r = l
7474 r
7575 }
7676 else throw("No initiator found!")
7777 }
7878 let o = toString(lastBlock.timestamp)
7979 [StringEntry((e + "_latest"), f), StringEntry((e + "_status"), "done"), StringEntry(((n + "_") + e), ((((f + "_") + o) + "_") + "done")), StringEntry("caller", toBase58String(d.callerPublicKey))]
8080 }
8181
8282
8383 @Verifier(s)
8484 func t () = sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey)
8585

github/deemru/w8io/169f3d6 
36.14 ms