tx · HpwsjFzXKcbZYBkcPm4rQQTxTCuriyUwN3CCXJMmxPE7 3N86fBeRNMYj4Lbc7po8PKtrXR2oLQXQB8a: -0.05000000 Waves 2024.05.08 09:33 [3096827] smart account 3N86fBeRNMYj4Lbc7po8PKtrXR2oLQXQB8a > SELF 0.00000000 Waves
{ "type": 13, "id": "HpwsjFzXKcbZYBkcPm4rQQTxTCuriyUwN3CCXJMmxPE7", "fee": 5000000, "feeAssetId": null, "timestamp": 1715150027211, "version": 2, "chainId": 84, "sender": "3N86fBeRNMYj4Lbc7po8PKtrXR2oLQXQB8a", "senderPublicKey": "4uUUD88FFMgtPjui9NEmEstYpUVQNPSLCQw5f8mYHmGz", "proofs": [ "2Qts9UqTo1vcJsksGAzTpUpv3WqGchhnT4h9aC1JngwrwWRgmY31pQg1Kw5S3VRUXyP941RxFjszmx4tECL4ZkUA" ], "script": "base64:BgIECAISAAUADVVTRFRfQVNTRVRfSUQCLDk4RDNwa0t2ZnJYRW5YbVFxS0dXZ3RvR3ZWaDFhVGY0Q1BEdHRxRzljc3VtAA9VU0RUXzJfQVNTRVRfSUQCLDk4RDNwa0t2ZnJYRW5YbVFxS0dXZ3RvR3ZWaDFhVGY0Q1BEdHRxRzljc3VtAA1VU0RDX0FTU0VUX0lEAiw5OEQzcGtLdmZyWEVuWG1RcUtHV2d0b0d2VmgxYVRmNENQRHR0cUc5Y3N1bQAPVVNEQ18yX0FTU0VUX0lEAiw5OEQzcGtLdmZyWEVuWG1RcUtHV2d0b0d2VmgxYVRmNENQRHR0cUc5Y3N1bQAMQkFJX0FTU0VUX0lEAixBeEdLUVJ4S280RjJFYmhyUnE2TjJ0ZExzeHRNbnB6UXNTNFFlbVY2VjFXMQEBaQEDYnV5AAQRV0FWRVNfVVNEVF9PUkFDTEUJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOMVdqaG1GM0V5dXR2cnZ0c2ZzU0xiaG1pTFU4QmMxVG95BBVXQVZFU19VU0RUX09SQUNMRV9LRVkC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SBpbiBXYXZlcywgVVNEQyBvciBVU0RUIQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQZzZW5kZXIFBmFtb3VudAkA2QQBBQxCQUlfQVNTRVRfSUQFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXk48joR", "height": 3096827, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2hFcSy1rFF3XKcJ72rGZcCaRLLNwnXASScwmpAJLtEU1 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | } | |
45 | 45 | else 0 | |
46 | 46 | } | |
47 | - | | |
47 | + | fraction(q, s, (12 * 100000)) | |
48 | 48 | } | |
49 | 49 | else if ((n == a)) | |
50 | 50 | then fraction(q, 1000, 12) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "98D3pkKvfrXEnXmQqKGWgtoGvVh1aTf4CPDttqG9csum" | |
5 | 5 | ||
6 | 6 | let b = "98D3pkKvfrXEnXmQqKGWgtoGvVh1aTf4CPDttqG9csum" | |
7 | 7 | ||
8 | 8 | let c = "98D3pkKvfrXEnXmQqKGWgtoGvVh1aTf4CPDttqG9csum" | |
9 | 9 | ||
10 | 10 | let d = "98D3pkKvfrXEnXmQqKGWgtoGvVh1aTf4CPDttqG9csum" | |
11 | 11 | ||
12 | 12 | let e = "AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1" | |
13 | 13 | ||
14 | 14 | @Callable(f) | |
15 | 15 | func buy () = { | |
16 | 16 | let g = addressFromStringValue("3N1WjhmF3EyutvrvtsfsSLbhmiLU8Bc1Toy") | |
17 | 17 | let h = "%s%s__price__WAVES-USDT" | |
18 | 18 | let i = size(f.payments) | |
19 | 19 | let j = f.payments[0].assetId | |
20 | 20 | let k = f.caller | |
21 | 21 | if ((i != 1)) | |
22 | 22 | then throw("Payment necessary!") | |
23 | 23 | else { | |
24 | 24 | let l = f.payments[0] | |
25 | 25 | let m = l.assetId | |
26 | 26 | let n = { | |
27 | 27 | let o = m | |
28 | 28 | if ($isInstanceOf(o, "ByteVector")) | |
29 | 29 | then { | |
30 | 30 | let p = o | |
31 | 31 | toBase58String(p) | |
32 | 32 | } | |
33 | 33 | else "" | |
34 | 34 | } | |
35 | 35 | let q = l.amount | |
36 | 36 | let r = if (!(isDefined(m))) | |
37 | 37 | then { | |
38 | 38 | let s = { | |
39 | 39 | let o = getInteger(g, h) | |
40 | 40 | if ($isInstanceOf(o, "Int")) | |
41 | 41 | then { | |
42 | 42 | let t = o | |
43 | 43 | t | |
44 | 44 | } | |
45 | 45 | else 0 | |
46 | 46 | } | |
47 | - | | |
47 | + | fraction(q, s, (12 * 100000)) | |
48 | 48 | } | |
49 | 49 | else if ((n == a)) | |
50 | 50 | then fraction(q, 1000, 12) | |
51 | 51 | else if ((n == b)) | |
52 | 52 | then fraction(q, 1000, 12) | |
53 | 53 | else if ((n == c)) | |
54 | 54 | then fraction(q, 1000, 12) | |
55 | 55 | else if ((n == d)) | |
56 | 56 | then fraction(q, 1000, 12) | |
57 | 57 | else throw("Payment necessary in Waves, USDC or USDT!") | |
58 | 58 | [ScriptTransfer(k, r, fromBase58String(e))] | |
59 | 59 | } | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Verifier(u) | |
64 | 64 | func v () = sigVerify(u.bodyBytes, u.proofs[0], u.senderPublicKey) | |
65 | 65 |
github/deemru/w8io/026f985 20.93 ms ◑