tx · 7Bm5TJ2TvHP25ZP3A5wePdt3MYN4fztZgYE6braUqVDg 3N1fcrWULKWACeWDuo3FpugKcoYC4xQ7uw8: -0.00600000 Waves 2022.07.07 13:48 [2129166] smart account 3N1fcrWULKWACeWDuo3FpugKcoYC4xQ7uw8 > SELF 0.00000000 Waves
{ "type": 13, "id": "7Bm5TJ2TvHP25ZP3A5wePdt3MYN4fztZgYE6braUqVDg", "fee": 600000, "feeAssetId": null, "timestamp": 1657190948310, "version": 2, "chainId": 84, "sender": "3N1fcrWULKWACeWDuo3FpugKcoYC4xQ7uw8", "senderPublicKey": "48K83j8fKJeoBfJYe7BTpnr2VQg7uLGwyCrhmdghH3xZ", "proofs": [ "5ityHQcXB8ywAzBWb9pAuYMRPwGF69tvYwP4cwmuhXuiuhsmHcbBgwd8RdHXytVhBh4Ct8q4ex3vYyXeJpt7ZxN4" ], "script": "base64:BgIRCAISCQoHAQEBCAgICBIAEgABAAlzZXBhcmF0b3ICAl9fAwFpAQllbWl0RXZlbnQHEHNvdXJjZV9jaGFpbl9pZHgQdGFyZ2V0X2NoYWluX2lkeAxibG9ja19oZWlnaHQKYmxvY2tfaGFzaAd0eF9oYXNoDHNvdXJjZV9hc3NldAZhbW91bnQECWFtb3VudEludAQHJG1hdGNoMAkAqAMBBQZhbW91bnQDCQABAgUHJG1hdGNoMAIGQmlnSW50BAFhBQckbWF0Y2gwBQFhAwkAAQIFByRtYXRjaDACBFVuaXQJAAIBAhBpbmNvcnJlY3QgYW1vdW50CQACAQILTWF0Y2ggZXJyb3IEDGV2ZW50TGFzdElkeAQHJG1hdGNoMAkAnwgBAg9FVkVOVFNfTEFTVF9JRFgDCQABAgUHJG1hdGNoMAIDSW50BAFhBQckbWF0Y2gwBQFhAwkAAQIFByRtYXRjaDACBFVuaXQAAAkAAgECC01hdGNoIGVycm9yBAVldmVudAkAuQkCCQDMCAIJAKQDAQUQc291cmNlX2NoYWluX2lkeAkAzAgCCQCkAwEFEHRhcmdldF9jaGFpbl9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aQZjYWxsZXIFCWluc3VyYW5jZQUEdW5pdAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICAhBJTlNVUkFOQ0VfRlJFRV9fCQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMAAAUDbmlsBQR1bml0AQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleW12KvQ=", "height": 2129166, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EYtzk38Wpt3hchAQhAzmUtXC8ixMDvaWzTWV9W692NJn Next: AJdswEgA3BKNYL6GhwLPyKqPgoxc7nUEoEXKGhhaya85 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func emitEvent (source_chain_idx,target_chain_idx,block_height,block_hash,tx_hash,source_asset,amount) = { | |
8 | 8 | let amountInt = match parseBigInt(amount) { | |
9 | 9 | case a: BigInt => | |
10 | 10 | a | |
11 | 11 | case _: Unit => | |
12 | 12 | throw("incorrect amount") | |
13 | 13 | case _ => | |
14 | 14 | throw("Match error") | |
15 | 15 | } | |
16 | 16 | let eventLastIdx = match getInteger("EVENTS_LAST_IDX") { | |
17 | 17 | case a: Int => | |
18 | 18 | a | |
19 | 19 | case _: Unit => | |
20 | 20 | 0 | |
21 | 21 | case _ => | |
22 | 22 | throw("Match error") | |
23 | 23 | } | |
24 | 24 | let event = makeString([toString(source_chain_idx), toString(target_chain_idx), toString(block_height), block_hash, tx_hash, source_asset, toString(amountInt)], separator) | |
25 | 25 | $Tuple2([StringEntry(("EVENTS__" + toString(eventLastIdx)), event), IntegerEntry("EVENTS_LAST_IDX", (eventLastIdx + 1))], unit) | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | ||
30 | 30 | @Callable(i) | |
31 | 31 | func depositInsurance () = { | |
32 | 32 | let err = if ((size(i.payments) != 1)) | |
33 | 33 | then throw("no payment") | |
34 | 34 | else if ((i.payments[0].assetId == unit)) | |
35 | 35 | then throw("payment is not WAVES") | |
36 | 36 | else if ((0 >= i.payments[0].amount)) | |
37 | 37 | then throw("zero payment") | |
38 | 38 | else unit | |
39 | 39 | if ((err == err)) | |
40 | 40 | then $Tuple2([IntegerEntry(("INSURANCE_FREE__" + toBase58String(i.caller.bytes)), i.payments[0].amount)], unit) | |
41 | 41 | else throw("Strict value is not equal to itself.") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(i) | |
47 | 47 | func withdrawInsurance () = { | |
48 | 48 | let insurance = match getInteger(("INSURANCE_FREE__" + toBase58String(i.caller.bytes))) { | |
49 | 49 | case a: Int => | |
50 | 50 | if ((a > 0)) | |
51 | 51 | then a | |
52 | 52 | else throw("no free insurance") | |
53 | 53 | case _ => | |
54 | 54 | throw("no insurance") | |
55 | 55 | } | |
56 | 56 | $Tuple2([ScriptTransfer(i.caller, insurance, unit), IntegerEntry(("INSURANCE_FREE__" + toBase58String(i.caller.bytes)), 0)], unit) | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Verifier(tx) | |
61 | 61 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
62 | 62 |
github/deemru/w8io/169f3d6 41.39 ms ◑