tx · 92a4xsHGjA5Wp8iBjdAMR8yU71eBJDoukCsBAyPi3ppw 3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx: -0.00200000 Waves 2024.11.11 03:57 [3366091] smart account 3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx > SELF 0.00000000 Waves
{ "type": 13, "id": "92a4xsHGjA5Wp8iBjdAMR8yU71eBJDoukCsBAyPi3ppw", "fee": 200000, "feeAssetId": null, "timestamp": 1731286648089, "version": 1, "sender": "3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx", "senderPublicKey": "HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j", "proofs": [ "4nBEwajcf2J4zg8PWL8um6yt1ggax8Q1FWdr8PQMbmF2skYpVaKexwsarQQuHmavfWX4hCFhhcDMBT37Kv87qifa", "thjzLh4CgCGXcCBobjtn2RQmDYGwhScQPkazx4xEFPdT4j4dk5ZKBjzQuLa4qdFBrZkZtSW6fDZrARy2Z442NZR" ], "script": "base64:CAEEDnN1YndhclRlc3RMMl8xASD573vbyW2SdSxAIEHALEwHCEdVziPd+qjz9Gf7oFK/OAQOc3Vid2FyVGVzdEwyXzIBIJgJ58SqdD5eKyOil/SIN3rHFdy+Td54qquqkH7Gbak1BAt0YXJnZXREYXBwMQkBBXZhbHVlAQkApggBAiMzTXN4NEFxNjl6V1VLeTRkMXd5S25RNG9mekVEQWZ2NU5nZgQLdGFyZ2V0RGFwcDIJAQV2YWx1ZQEJAKYIAQIjM1BKVm03eExQYWJtWW9oYm52ZGdHRFlITXduWnhGMngxOG0EDHNlY3VyaXR5RGFwcAkBBXZhbHVlAQkApggBAiMzTXpnTGJza044MnN1WmdrbXFUdnpReER0WmZqUWZYMURMcAQSdW5saW1pdGVkRnVuY3Rpb25zAjhleHRlbmRNYWluQ2hhaW4sYXBwZW5kQmxvY2ssc3RhcnRBbHRDaGFpbixleHRlbmRBbHRDaGFpbgQQbGltaXRlZEZ1bmN0aW9ucw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YGCQACAQIfU2VjdXJpdHkgZEFwcCB2YWxpZGF0aW9uIGZhaWxlZAcHB9kopqw=", "chainId": 84, "height": 3366091, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D3i4jgvMLm8iMGQfhYGcUTKk5P7PaXJ4wCEyua8V5obH Next: none Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | then if ((t.fee > maxFeePerTx)) | |
34 | 34 | then throw("Transaction fee exceeds maximum allowed amount") | |
35 | 35 | else { | |
36 | - | let checkLimitResult = ScriptTransfer(securityDapp, 0, unit) | |
37 | - | true | |
36 | + | let checkLimitResult = getBoolean(securityDapp, "checkAndIncrementCounter") | |
37 | + | if ((checkLimitResult == true)) | |
38 | + | then true | |
39 | + | else throw("Security dApp validation failed") | |
38 | 40 | } | |
39 | 41 | else false | |
40 | 42 | else false | |
41 | 43 | case _ => | |
42 | - | | |
44 | + | false | |
43 | 45 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 8 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let subwarTestL2_1 = base58'HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j' | |
4 | 4 | let subwarTestL2_2 = base58'BEVjN4AXKQ2Yw7KS1wiL5DMGg5V9cDniNH7dK2v5d7Ek' | |
5 | 5 | let targetDapp1 = value(addressFromString("3Msx4Aq69zWUKy4d1wyKnQ4ofzEDAfv5Ngf")) | |
6 | 6 | let targetDapp2 = value(addressFromString("3PJVm7xLPabmYohbnvdgGDYHMwnZxF2x18m")) | |
7 | 7 | let securityDapp = value(addressFromString("3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp")) | |
8 | 8 | let unlimitedFunctions = "extendMainChain,appendBlock,startAltChain,extendAltChain" | |
9 | 9 | let limitedFunctions = "join,leave,withdraw,claimLP" | |
10 | 10 | let maxFeePerTx = 500000 | |
11 | 11 | let signed1 = if (sigVerify_16Kb(tx.bodyBytes, tx.proofs[0], subwarTestL2_1)) | |
12 | 12 | then 1 | |
13 | 13 | else 0 | |
14 | 14 | let signed2 = if (sigVerify_16Kb(tx.bodyBytes, tx.proofs[1], subwarTestL2_2)) | |
15 | 15 | then 1 | |
16 | 16 | else 0 | |
17 | 17 | let isMultiSignValid = ((signed1 + signed2) == 2) | |
18 | 18 | func isUnlimitedFunction (funcName) = (indexOf(unlimitedFunctions, funcName) != unit) | |
19 | 19 | ||
20 | 20 | func isLimitedFunction (funcName) = (indexOf(limitedFunctions, funcName) != unit) | |
21 | 21 | ||
22 | 22 | match tx { | |
23 | 23 | case t: InvokeScriptTransaction => | |
24 | 24 | let targetFuncName = t.function | |
25 | 25 | if (isMultiSignValid) | |
26 | 26 | then true | |
27 | 27 | else if (if ((t.dApp == targetDapp1)) | |
28 | 28 | then true | |
29 | 29 | else (t.dApp == targetDapp2)) | |
30 | 30 | then if (isUnlimitedFunction(targetFuncName)) | |
31 | 31 | then true | |
32 | 32 | else if (isLimitedFunction(targetFuncName)) | |
33 | 33 | then if ((t.fee > maxFeePerTx)) | |
34 | 34 | then throw("Transaction fee exceeds maximum allowed amount") | |
35 | 35 | else { | |
36 | - | let checkLimitResult = ScriptTransfer(securityDapp, 0, unit) | |
37 | - | true | |
36 | + | let checkLimitResult = getBoolean(securityDapp, "checkAndIncrementCounter") | |
37 | + | if ((checkLimitResult == true)) | |
38 | + | then true | |
39 | + | else throw("Security dApp validation failed") | |
38 | 40 | } | |
39 | 41 | else false | |
40 | 42 | else false | |
41 | 43 | case _ => | |
42 | - | | |
44 | + | false | |
43 | 45 | } |
github/deemru/w8io/169f3d6 43.83 ms ◑