tx · GkQThJFaL3X8ZPZuAczM7q7yL2UGiTD4JSRsEXb9VMae

3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD:  -0.01000000 Waves

2023.08.19 19:35 [2717731] smart account 3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD > SELF 0.00000000 Waves

{ "type": 13, "id": "GkQThJFaL3X8ZPZuAczM7q7yL2UGiTD4JSRsEXb9VMae", "fee": 1000000, "feeAssetId": null, "timestamp": 1692462923468, "version": 2, "chainId": 84, "sender": "3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD", "senderPublicKey": "G6PnkMn8MpXBkNwsQKMn1o1V7EKMgZyHCJRdFMQuouBC", "proofs": [ "25BvZTB1AvkeTHmb3aW2NUaQ2wP7R2Eg6meV6wMdjWkJfqbiD4ZDbDnvfVJpMtkiydaHRKJ7n5ZfAQWUUh2iJZ1q" ], "script": "base64:BgIHCAISAwoBCAkAEGNvbnRyYWN0RmlsZU5hbWUCAnAxAA10b2tlbl9hZGRyZXNzCQEHQWRkcmVzcwEBGgFUUevquKc82yLj6POP0d8MGx4c9yM7LkYsAA5QUkFDVElDRV90b2tlbgEgmof7CiKwpMapEnkqALPSW46iVZVhy83sQ1L32dsdwioAA1NFUAIBIAAIa2Fzc2V0SWQCB0Fzc2V0SUQBBmtleU1zZwAJALkJAgkAzAgCAgIlcwkAzAgCAinQn9C10YDQtdC00LDQvdC90L7QtSDRgdC+0L7QsdGJ0LXQvdC40LU6IAUDbmlsBQNTRVABCmtleUFzc2V0SUQACQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJRAUDbmlsBQNTRVABB3dyYXBFcnIBA21zZwkAuQkCCQDMCAIFEGNvbnRyYWN0RmlsZU5hbWUJAMwIAgIBOgkAzAgCBQNtc2cFA25pbAIAAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cBAWkBB21lc3NhZ2UBA21zZwQFd29yZHMJALUJAgUDbXNnBQNTRVAECXdvcmRDb3VudAkAkAMBBQV3b3JkcwQHcGF5bWVudAkAkQMCCAUBaQhwYXltZW50cwAABA5wYXltZW50X2Ftb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQDCQECIT0CBQ5wYXltZW50X2Ftb3VudAUJd29yZENvdW50CQEIdGhyb3dFcnIBAjLQmtC+0Lst0LLQviDRgdC70L7QsiAhPSDQutC+0Lst0LLRgyDRgtC+0LrQtdC90L7QsgMJAAACBQ5QUkFDVElDRV90b2tlbggJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkCQEIdGhyb3dFcnIBAi7Qn9C70LDRgtC10LYg0LTQvtC70LbQtdC9INCx0YvRgtGMINCyIFBSQUNUSUNFCQDMCAIJAQtTdHJpbmdFbnRyeQIJAQZrZXlNc2cABQNtc2cFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkXc94V", "height": 2717731, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hk1QunLJEYNrAe7ZSQdb9EPHa25Y4VVhGYvHxLmZzzPw Next: DDq4tiUU1CZLkcPDSBJ5XN4FyH56cbEF8wSUxJTKeLCy Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "p1"
55
6-let b = "_"
6+let b = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD')
77
8-let c = "AssetID"
8+let c = base58'BQE3kUrRJ2nEzsXVeuB1KGBdyRhCHa3fRtSkyTsCJwa1'
99
10-let d = "Token"
10+let d = " "
1111
12-func e () = makeString(["%s", "assetID"], b)
12+let e = "AssetID"
13+
14+func f () = makeString(["%s", "Переданное сообщение: "], d)
1315
1416
15-func f () = makeString(["%s", "purchase: "], b)
17+func g () = makeString(["%s", "assetID"], d)
1618
1719
18-func g (h) = makeString([a, ":", h], "")
20+func h (i) = makeString([a, ":", i], "")
1921
2022
21-func i (h) = throw(g(h))
23+func j (i) = throw(h(i))
2224
2325
24-@Callable(j)
25-func tokenIssuance () = {
26- let k = "PRACTICE"
27- let l = "1:10 waves"
28- let m = 10000000
29- let n = 0
30- let o = Issue(k, l, m, n, true)
31- let p = calculateAssetId(o)
32-[o, BinaryEntry(c, p), StringEntry(d, o.name)]
26+@Callable(k)
27+func message (i) = {
28+ let l = split(i, d)
29+ let m = size(l)
30+ let n = k.payments[0]
31+ let o = k.payments[0].amount
32+ if ((o != m))
33+ then j("Кол-во слов != кол-ву токенов")
34+ else if ((c == k.payments[0].assetId))
35+ then j("Платеж должен быть в PRACTICE")
36+ else [StringEntry(f(), i)]
3337 }
3438
3539
36-
37-@Callable(j)
38-func buyToken (m) = {
39- let q = (j.payments[0].assetId == unit)
40- let p = valueOrErrorMessage(getBinaryValue(this, c), "id токена не найден")
41- let r = j.payments[0].amount
42- let s = 10000000
43- let t = (s * m)
44- let u = {
45- let v = j.payments[0]
46- if ($isInstanceOf(v, "AttachedPayment"))
47- then {
48- let w = v
49- w
50- }
51- else throw("Send exactly 0.1 WAVES")
52- }
53- if ((q != true))
54- then i("Платеж должен быть в WAVES")
55- else if ((r != t))
56- then i("Неправильная сумма платежа")
57- else [ScriptTransfer(j.caller, m, p), IntegerEntry(f(), m)]
58- }
59-
40+@Verifier(p)
41+func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
6042
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "p1"
55
6-let b = "_"
6+let b = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD')
77
8-let c = "AssetID"
8+let c = base58'BQE3kUrRJ2nEzsXVeuB1KGBdyRhCHa3fRtSkyTsCJwa1'
99
10-let d = "Token"
10+let d = " "
1111
12-func e () = makeString(["%s", "assetID"], b)
12+let e = "AssetID"
13+
14+func f () = makeString(["%s", "Переданное сообщение: "], d)
1315
1416
15-func f () = makeString(["%s", "purchase: "], b)
17+func g () = makeString(["%s", "assetID"], d)
1618
1719
18-func g (h) = makeString([a, ":", h], "")
20+func h (i) = makeString([a, ":", i], "")
1921
2022
21-func i (h) = throw(g(h))
23+func j (i) = throw(h(i))
2224
2325
24-@Callable(j)
25-func tokenIssuance () = {
26- let k = "PRACTICE"
27- let l = "1:10 waves"
28- let m = 10000000
29- let n = 0
30- let o = Issue(k, l, m, n, true)
31- let p = calculateAssetId(o)
32-[o, BinaryEntry(c, p), StringEntry(d, o.name)]
26+@Callable(k)
27+func message (i) = {
28+ let l = split(i, d)
29+ let m = size(l)
30+ let n = k.payments[0]
31+ let o = k.payments[0].amount
32+ if ((o != m))
33+ then j("Кол-во слов != кол-ву токенов")
34+ else if ((c == k.payments[0].assetId))
35+ then j("Платеж должен быть в PRACTICE")
36+ else [StringEntry(f(), i)]
3337 }
3438
3539
36-
37-@Callable(j)
38-func buyToken (m) = {
39- let q = (j.payments[0].assetId == unit)
40- let p = valueOrErrorMessage(getBinaryValue(this, c), "id токена не найден")
41- let r = j.payments[0].amount
42- let s = 10000000
43- let t = (s * m)
44- let u = {
45- let v = j.payments[0]
46- if ($isInstanceOf(v, "AttachedPayment"))
47- then {
48- let w = v
49- w
50- }
51- else throw("Send exactly 0.1 WAVES")
52- }
53- if ((q != true))
54- then i("Платеж должен быть в WAVES")
55- else if ((r != t))
56- then i("Неправильная сумма платежа")
57- else [ScriptTransfer(j.caller, m, p), IntegerEntry(f(), m)]
58- }
59-
40+@Verifier(p)
41+func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey)
6042

github/deemru/w8io/026f985 
51.76 ms