tx · 7cq1tzKCiHvbJbXcZjbv8A4zXnVvjLpxSunqHfS1FXsv 3Mu3e7R5nEBrDEAzznC7h68ffzL5JouGszd: -0.01000000 Waves 2023.09.26 12:24 [2772197] smart account 3Mu3e7R5nEBrDEAzznC7h68ffzL5JouGszd > SELF 0.00000000 Waves
{ "type": 13, "id": "7cq1tzKCiHvbJbXcZjbv8A4zXnVvjLpxSunqHfS1FXsv", "fee": 1000000, "feeAssetId": null, "timestamp": 1695720242823, "version": 2, "chainId": 84, "sender": "3Mu3e7R5nEBrDEAzznC7h68ffzL5JouGszd", "senderPublicKey": "B4bNSdbqghMi7FKwR3XuZzFQQS6wJABczdGZPWZe7Wj5", "proofs": [ "48MHKTp3bWU3hSzRAutut6Vzjnb9NoeGsVmTbciczUjQFhfA7Ft5LDRfR78HRp1yHEvUcoD71edBXkM1nWFmzgVA" ], "script": "base64:BgIhCAISBAoCCAgSBAoCCAESBQoDAgECEgQKAgIBEgQKAggYBwAOZmFjdG9yeUFkZHJlc3MJAKcIAQkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwIQZmFjdG9yeVB1YmxpY0tleQAOc2VydmljZUFkZHJlc3MJAKcIAQkBEUBleHRyTmF0aXZlKDEwNTIpAgUOZmFjdG9yeUFkZHJlc3MCEHNlcnZpY2VQdWJsaWNLZXkADG93bmVyQWRkcmVzcwkApwgBCQERQGV4dHJOYXRpdmUoMTA1MikCBQR0aGlzAg5vd25lclB1YmxpY0tleQELb25seUFkZHJlc3MCAWkHYWRkcmVzcwMJAAACCAUBaQZjYWxsZXIFB2FkZHJlc3MGCQEFdGhyb3cAAQhvbmx5VGhpcwEBaQkBC29ubHlBZGRyZXNzAgUBaQUEdGhpcwELb25seVNlcnZpY2UBAWkJAQtvbmx5QWRkcmVzcwIFAWkFDnNlcnZpY2VBZGRyZXNzAQlvbmx5T3duZXIBAWkJAQtvbmx5QWRkcmVzcwIFAWkFDG93bmVyQWRkcmVzcwUBaQELc3RyaW5nRW50cnkCA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eAZwcm9vZnMAAAUMYm90UHVibGljS2V5CQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V51W71pQ==", "height": 2772197, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 3vyX3smUzognaBdknxxrn4jNZr4PhXk3P1AG6tw5ihP9 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let factoryAddress = addressFromPublicKey(getBinaryValue(this, "factoryPublicKey")) | |
5 | + | ||
6 | + | let serviceAddress = addressFromPublicKey(getBinaryValue(factoryAddress, "servicePublicKey")) | |
7 | + | ||
8 | + | let ownerAddress = addressFromPublicKey(getBinaryValue(this, "ownerPublicKey")) | |
9 | + | ||
10 | + | func onlyAddress (i,address) = if ((i.caller == address)) | |
11 | + | then true | |
12 | + | else throw() | |
13 | + | ||
14 | + | ||
15 | + | func onlyThis (i) = onlyAddress(i, this) | |
16 | + | ||
17 | + | ||
18 | + | func onlyService (i) = onlyAddress(i, serviceAddress) | |
19 | + | ||
20 | + | ||
21 | + | func onlyOwner (i) = onlyAddress(i, ownerAddress) | |
22 | + | ||
23 | + | ||
24 | + | @Callable(i) | |
25 | + | func stringEntry (key,val) = if (onlyService(i)) | |
26 | + | then $Tuple2([StringEntry(key, val)], key) | |
27 | + | else $Tuple2(nil, unit) | |
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | @Callable(i) | |
32 | + | func integerEntry (key,val) = if (onlyService(i)) | |
33 | + | then $Tuple2([IntegerEntry(key, val)], key) | |
34 | + | else $Tuple2(nil, unit) | |
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | @Callable(i) | |
39 | + | func transferAsset (recipientBytes,amount,assetId) = if (onlyService(i)) | |
40 | + | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount) | |
41 | + | else $Tuple2(nil, unit) | |
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | @Callable(i) | |
46 | + | func transferWaves (recipientBytes,amount) = if (onlyService(i)) | |
47 | + | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount) | |
48 | + | else $Tuple2(nil, unit) | |
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | @Callable(i) | |
53 | + | func call (function,args) = if (onlyOwner(i)) | |
54 | + | then { | |
55 | + | let result = reentrantInvoke(serviceAddress, function, args, i.payments) | |
56 | + | $Tuple2(nil, result) | |
57 | + | } | |
58 | + | else $Tuple2(nil, unit) | |
59 | + | ||
60 | + | ||
61 | + | @Verifier(tx) | |
62 | + | func verify () = { | |
63 | + | let botPublicKey = getBinaryValue(factoryAddress, "botPublicKey") | |
64 | + | match tx { | |
65 | + | case _: Order => | |
66 | + | sigVerify(tx.bodyBytes, tx.proofs[0], botPublicKey) | |
67 | + | case _ => | |
68 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
69 | + | } | |
70 | + | } | |
71 | + |
github/deemru/w8io/03bedc9 21.67 ms ◑![]()