tx · 8GVeXGySAr7bQgBWCAgH3br2n7WFjwEwo54sr2FTxUky 3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD: -0.01000000 Waves 2023.07.30 11:27 [2688361] smart account 3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD > SELF 0.00000000 Waves
{ "type": 13, "id": "8GVeXGySAr7bQgBWCAgH3br2n7WFjwEwo54sr2FTxUky", "fee": 1000000, "feeAssetId": null, "timestamp": 1690705686328, "version": 2, "chainId": 84, "sender": "3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD", "senderPublicKey": "G6PnkMn8MpXBkNwsQKMn1o1V7EKMgZyHCJRdFMQuouBC", "proofs": [ "3UJagm34g1VwKqEj8HgRRBv9YpNRdymAWZkFLCbQVfoK9jjWstiD5usCFUBhcpRMyZ9H3t83TpjnpRBpHDADN1ZT" ], "script": "base64:BgIJCAISABIDCgEBBwAQY29udHJhY3RGaWxlTmFtZQICcDEAA1NFUAIBXwAIa2Fzc2V0SWQCB0Fzc2V0SUQACWtuZXdUb2tlbgIFVG9rZW4BCmtleUFzc2V0SUQACQC5CQIJAMwIAgICJXMJAMwIAgIHYXNzZXRJRAUDbmlsBQNTRVABB3dyYXBFcnIBA21zZwkAuQkCCQDMCAIFEGNvbnRyYWN0RmlsZU5hbWUJAMwIAgIBOgkAzAgCBQNtc2cFA25pbAIAAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cCAWkBDXRva2VuSXNzdWFuY2UABARuYW1lAghQUkFDVElDRQQLZGVzY3JpcHRpb24CCjE6MTAgd2F2ZXMECHF1YW50aXR5AICt4gQECGRlY2ltYWxzAAMEC2lzc3VlX3Rva2VuCQDCCAUFBG5hbWUFC2Rlc2NyaXB0aW9uBQhxdWFudGl0eQUIZGVjaW1hbHMGBAdhc3NldElkCQC4CAEFC2lzc3VlX3Rva2VuCQDMCAIFC2lzc3VlX3Rva2VuCQDMCAIJAQtCaW5hcnlFbnRyeQIFCGthc3NldElkBQdhc3NldElkCQDMCAIJAQtTdHJpbmdFbnRyeQIFCWtuZXdUb2tlbggFC2lzc3VlX3Rva2VuBG5hbWUFA25pbAFpAQhidXlUb2tlbgEIcXVhbnRpdHkECndhdmVzT3JFcnIJAAACCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQFBHVuaXQEB2Fzc2V0SWQJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwUIa2Fzc2V0SWQCIWlkINGC0L7QutC10L3QsCDQvdC1INC90LDQudC00LXQvQQNcGF5bWVudEFtb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQEC3Rva2VuX3ByaWNlAKCNBgQKYW1vdW50X2R1ZQkAaAIFC3Rva2VuX3ByaWNlBQhxdWFudGl0eQQHcGF5bWVudAQHJG1hdGNoMAkAkQMCCAUBaQhwYXltZW50cwAAAwkAAQIFByRtYXRjaDACD0F0dGFjaGVkUGF5bWVudAQBcAUHJG1hdGNoMAUBcAkAAgECFlNlbmQgZXhhY3RseSAwLjEgV0FWRVMDCQAAAgUKd2F2ZXNPckVycgYJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQhxdWFudGl0eQUHYXNzZXRJZAUDbmlsCQEIdGhyb3dFcnIBAivQn9C70LDRgtC10LYg0LTQvtC70LbQtdC9INCx0YvRgtGMINCyIFdBVkVTAP1cpds=", "height": 2688361, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FmLU4XSN479srnTbPzuq5GkeLeW1Jif1Y8BXvvHMrrFG Next: 73KbMpTwPmqMtA1Z1pz7tZjeQsEAfEmCY1QWRuGeAE6e Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = "Token" | |
11 | 11 | ||
12 | - | func e ( | |
12 | + | func e () = makeString(["%s", "assetID"], b) | |
13 | 13 | ||
14 | 14 | ||
15 | - | func | |
15 | + | func f (g) = makeString([a, ":", g], "") | |
16 | 16 | ||
17 | 17 | ||
18 | - | @Callable(h) | |
18 | + | func h (g) = throw(f(g)) | |
19 | + | ||
20 | + | ||
21 | + | @Callable(i) | |
19 | 22 | func tokenIssuance () = { | |
20 | - | let | |
21 | - | let | |
22 | - | let | |
23 | - | let | |
24 | - | let | |
25 | - | let | |
26 | - | [ | |
23 | + | let j = "PRACTICE" | |
24 | + | let k = "1:10 waves" | |
25 | + | let l = 10000000 | |
26 | + | let m = 3 | |
27 | + | let n = Issue(j, k, l, m, true) | |
28 | + | let o = calculateAssetId(n) | |
29 | + | [n, BinaryEntry(c, o), StringEntry(d, n.name)] | |
27 | 30 | } | |
28 | 31 | ||
29 | 32 | ||
30 | 33 | ||
31 | - | @Callable(h) | |
32 | - | func buysToken (k) = { | |
33 | - | let o = (h.payments[0].assetId == unit) | |
34 | - | let n = valueOrErrorMessage(getBinaryValue(this, c), "id токена не найден") | |
35 | - | let p = h.payments[0].amount | |
36 | - | let q = (1 / 10000000) | |
37 | - | let r = (q * k) | |
38 | - | if (if ((o == true)) | |
39 | - | then (p == r) | |
40 | - | else false) | |
41 | - | then [ScriptTransfer(h.caller, k, n)] | |
42 | - | else g("Платеж должен быть в WAVES") | |
34 | + | @Callable(i) | |
35 | + | func buyToken (l) = { | |
36 | + | let p = (i.payments[0].assetId == unit) | |
37 | + | let o = valueOrErrorMessage(getBinaryValue(this, c), "id токена не найден") | |
38 | + | let q = i.payments[0].amount | |
39 | + | let r = 100000 | |
40 | + | let s = (r * l) | |
41 | + | let t = { | |
42 | + | let u = i.payments[0] | |
43 | + | if ($isInstanceOf(u, "AttachedPayment")) | |
44 | + | then { | |
45 | + | let v = u | |
46 | + | v | |
47 | + | } | |
48 | + | else throw("Send exactly 0.1 WAVES") | |
49 | + | } | |
50 | + | if ((p == true)) | |
51 | + | then [ScriptTransfer(i.caller, l, o)] | |
52 | + | else h("Платеж должен быть в WAVES") | |
43 | 53 | } | |
44 | 54 | ||
45 | 55 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "p1" | |
5 | 5 | ||
6 | 6 | let b = "_" | |
7 | 7 | ||
8 | 8 | let c = "AssetID" | |
9 | 9 | ||
10 | 10 | let d = "Token" | |
11 | 11 | ||
12 | - | func e ( | |
12 | + | func e () = makeString(["%s", "assetID"], b) | |
13 | 13 | ||
14 | 14 | ||
15 | - | func | |
15 | + | func f (g) = makeString([a, ":", g], "") | |
16 | 16 | ||
17 | 17 | ||
18 | - | @Callable(h) | |
18 | + | func h (g) = throw(f(g)) | |
19 | + | ||
20 | + | ||
21 | + | @Callable(i) | |
19 | 22 | func tokenIssuance () = { | |
20 | - | let | |
21 | - | let | |
22 | - | let | |
23 | - | let | |
24 | - | let | |
25 | - | let | |
26 | - | [ | |
23 | + | let j = "PRACTICE" | |
24 | + | let k = "1:10 waves" | |
25 | + | let l = 10000000 | |
26 | + | let m = 3 | |
27 | + | let n = Issue(j, k, l, m, true) | |
28 | + | let o = calculateAssetId(n) | |
29 | + | [n, BinaryEntry(c, o), StringEntry(d, n.name)] | |
27 | 30 | } | |
28 | 31 | ||
29 | 32 | ||
30 | 33 | ||
31 | - | @Callable(h) | |
32 | - | func buysToken (k) = { | |
33 | - | let o = (h.payments[0].assetId == unit) | |
34 | - | let n = valueOrErrorMessage(getBinaryValue(this, c), "id токена не найден") | |
35 | - | let p = h.payments[0].amount | |
36 | - | let q = (1 / 10000000) | |
37 | - | let r = (q * k) | |
38 | - | if (if ((o == true)) | |
39 | - | then (p == r) | |
40 | - | else false) | |
41 | - | then [ScriptTransfer(h.caller, k, n)] | |
42 | - | else g("Платеж должен быть в WAVES") | |
34 | + | @Callable(i) | |
35 | + | func buyToken (l) = { | |
36 | + | let p = (i.payments[0].assetId == unit) | |
37 | + | let o = valueOrErrorMessage(getBinaryValue(this, c), "id токена не найден") | |
38 | + | let q = i.payments[0].amount | |
39 | + | let r = 100000 | |
40 | + | let s = (r * l) | |
41 | + | let t = { | |
42 | + | let u = i.payments[0] | |
43 | + | if ($isInstanceOf(u, "AttachedPayment")) | |
44 | + | then { | |
45 | + | let v = u | |
46 | + | v | |
47 | + | } | |
48 | + | else throw("Send exactly 0.1 WAVES") | |
49 | + | } | |
50 | + | if ((p == true)) | |
51 | + | then [ScriptTransfer(i.caller, l, o)] | |
52 | + | else h("Платеж должен быть в WAVES") | |
43 | 53 | } | |
44 | 54 | ||
45 | 55 |
github/deemru/w8io/169f3d6 73.56 ms ◑