tx · 5MmQnKSoVnPuQL7P6rabxKihj6ZWK9T4jcAv9Uh9GCi7 3N7KcuNZ2Pe7hakkyJhJqg63fTZdxPnSX4n: -0.01000000 Waves 2022.05.22 05:46 [2062309] smart account 3N7KcuNZ2Pe7hakkyJhJqg63fTZdxPnSX4n > SELF 0.00000000 Waves
{ "type": 13, "id": "5MmQnKSoVnPuQL7P6rabxKihj6ZWK9T4jcAv9Uh9GCi7", "fee": 1000000, "feeAssetId": null, "timestamp": 1653187614192, "version": 2, "chainId": 84, "sender": "3N7KcuNZ2Pe7hakkyJhJqg63fTZdxPnSX4n", "senderPublicKey": "DohVVD3Qvdzb87xgN5f6HTwkopRNUzEXYmooZ7VqgAbP", "proofs": [ "5WAptFmCEeBTYn7Vuh6YPoLkE1RhQfHRWMVo9C69WC3yESywpV9qkSfk2Qm8LxDqzWXfpnJNNaJBdfj3zyX6u8iE" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIIAQAAAAMAAAAAF0RFQ0lNQUxfUE9JTlRTX0lOX1RPS0VOAAAAAAAAD0JAAAAAAAdVU0ROX0lEAQAAACCMzUgMLnJkPY4/IB9ub3HYe/HmIkiLCcBrVjQQxAnUWgAAAAADV1ZTAAAAAAAF9eEAAAAAAQAAAAFpAQAAAARzd2FwAAAAAgAAAAlyb3V0ZXNTdHIAAAAMbWluVG9SZWNlaXZlBAAAAA1jYWxsZXJBZGRyZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAGYW1vdW50CAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACBQAAAA1jYWxsZXJBZGRyZXNzAgAAAAxfc3dhcEFtb3VudF8JAABrAAAAAwUAAAAGYW1vdW50BQAAABdERUNJTUFMX1BPSU5UU19JTl9UT0tFTgUAAAADV1ZTCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAANY2FsbGVyQWRkcmVzcwkAAGsAAAADBQAAAAZhbW91bnQFAAAAF0RFQ0lNQUxfUE9JTlRTX0lOX1RPS0VOBQAAAANXVlMFAAAAB1VTRE5fSUQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5+aVvvw==", "height": 2062309, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H6ETtdrTrWoX6swbVkLfTb8n5UAzwJLhgiP9tfB1CWxN Next: DifXZ6b2MDUn6WyHqYxqdMkksbc48yfbVj7MjS2zbXww Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = | |
4 | + | let a = 1000000 | |
5 | 5 | ||
6 | - | let b = | |
6 | + | let b = base58'AUddX5CKUwoa6G414ERDiV1kbUQzz8A7fCVuLhwVW7cD' | |
7 | 7 | ||
8 | - | func c (d,e) = { | |
9 | - | let f = sha256(toBytes((d + e))) | |
10 | - | let g = toInt(f) | |
11 | - | b[(g % a)] | |
8 | + | let c = 100000000 | |
9 | + | ||
10 | + | @Callable(d) | |
11 | + | func swap (e,f) = { | |
12 | + | let g = toBase58String(d.caller.bytes) | |
13 | + | let h = value(d.payments[0]) | |
14 | + | let i = h.amount | |
15 | + | [IntegerEntry((g + "_swapAmount_"), fraction(i, a, c)), ScriptTransfer(value(addressFromString(g)), fraction(i, a, c), b)] | |
12 | 16 | } | |
13 | 17 | ||
14 | 18 | ||
15 | - | func h (i) = { | |
16 | - | let j = getString(this, (i + "_a")) | |
17 | - | if ($isInstanceOf(j, "String")) | |
18 | - | then { | |
19 | - | let k = j | |
20 | - | k | |
21 | - | } | |
22 | - | else i | |
23 | - | } | |
24 | - | ||
25 | - | ||
26 | - | @Callable(l) | |
27 | - | func tellme (d) = { | |
28 | - | let k = extract(l.payment) | |
29 | - | let m = k.amount | |
30 | - | let n = toBase58String(l.caller.bytes) | |
31 | - | let o = c(d, h(n)) | |
32 | - | WriteSet([DataEntry((n + "_q"), d), DataEntry((n + "_a"), o)]) | |
33 | - | } | |
34 | - | ||
19 | + | @Verifier(j) | |
20 | + | func k () = sigVerify(j.bodyBytes, j.proofs[0], j.senderPublicKey) | |
35 | 21 |
github/deemru/w8io/026f985 20.51 ms ◑