tx · EPMyhANBDH9PQEFXZNP4Q1tKQpXfU2TTE8vUZJACkMLF

3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx:  -0.00200000 Waves

2024.11.11 01:24 [3365948] smart account 3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx > SELF 0.00000000 Waves

{ "type": 13, "id": "EPMyhANBDH9PQEFXZNP4Q1tKQpXfU2TTE8vUZJACkMLF", "fee": 200000, "feeAssetId": null, "timestamp": 1731277512571, "version": 1, "sender": "3N3wBswhGGLLvVmd6KAA7hH8tZsu2iSY5Yx", "senderPublicKey": "HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j", "proofs": [ "4qJ2RQPK6J2ACmvaQ5jCPUeaifS3kpdaRx6unboUe8QBHkbR18cPhkJeqoudDXpXRxHjMEqicGtVjB9WvvSmTmxp", "5w8Egxe2QdQjzx48VysNWCCKT8EWqZqDkNYjiQ3Zeo1eBm49qfy4ycCcJ5mFJnUx1a66GFR8a5J1ALT4hA6kMHCZ" ], "script": "base64:CAEECnN1YndhckwyXzEBIFXLF+Zti9uTBsn3e5jGAZGN+PIylNb+BdUYqB6N/eU5BApzdWJ3YXJMMl8yASC/Vct7h76s8qjoOGDw3FEbR+Bj5YR+AdqPOuAXIXHybAQLdGFyZ2V0RGFwcDEJAQV2YWx1ZQEJAKYIAQIjM1BLZ044cmZtdkY3aEs3UldKYnB2a2g1OWUxcFFrVXplcm8EC3RhcmdldERhcHAyCQEFdmFsdWUBCQCmCAECIzNQSlZtN3hMUGFibVlvaGJudmRnR0RZSE13blp4RjJ4MThtBAxzZWN1cml0eURhcHAJAQV2YWx1ZQEJAKYIAQIjM016Z0xic2tOODJzdVpna21xVHZ6UXhEdFpmalFmWDFETHAEEnVubGltaXRlZEZ1bmN0aW9ucwI4ZXh0ZW5kTWFpbkNoYWluLGFwcGVuZEJsb2NrLHN0YXJ0QWx0Q2hhaW4sZXh0ZW5kQWx0Q2hhaW4EEGxpbWl0ZW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ZWNrTGltaXRSZXN1bHQDCQABAgUHJG1hdGNoMQIOU2NyaXB0VHJhbnNmZXIEEGNoZWNrTGltaXRSZXN1bHQFByRtYXRjaDEGCQACAQIjSW52YWxpZCByZXNwb25zZSBmcm9tIHNlY3VyaXR5IGRBcHAHBwUQaXNNdWx0aVNpZ25WYWxpZHfB3Bo=", "chainId": 84, "height": 3365948, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2mfpoxa7qfiFvXgkQRubH2DG3bbSMjvisgVtCqAiE2ms Next: Ek9H3jgrWL4aT2DoYuQmdjgcprBBzgDNefUW8jLh345u Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 8 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-let subwarL2_1 = base58'HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j'
4-let subwarL2_2 = base58'BEVjN4AXKQ2Yw7KS1wiL5DMGg5V9cDniNH7dK2v5d7Ek'
5-let targetDapp1 = value(addressFromString("3Msx4Aq69zWUKy4d1wyKnQ4ofzEDAfv5Ngf"))
3+let subwarL2_1 = base58'6muGj1AZfEJ2jxi2UKUDR8qsEchQtouSycDRaTHXk7Wx'
4+let subwarL2_2 = base58'DstkNBYUaD6nmPrRxSPM3bbv9hsAogWghMzRbPbYTJUj'
5+let targetDapp1 = value(addressFromString("3PKgN8rfmvF7hK7RWJbpvkh59e1pQkUzero"))
66 let targetDapp2 = value(addressFromString("3PJVm7xLPabmYohbnvdgGDYHMwnZxF2x18m"))
7-let functions1 = "extendMainChain,appendBlock,startAltChain,extendAltChain,join,leave,withdraw"
8-let functions2 = "claimLP"
7+let securityDapp = value(addressFromString("3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp"))
8+let unlimitedFunctions = "extendMainChain,appendBlock,startAltChain,extendAltChain"
9+let limitedFunctions = "join,leave,withdraw,claimLP"
10+let maxFeePerTx = 500000
911 let signed1 = if (sigVerify_16Kb(tx.bodyBytes, tx.proofs[0], subwarL2_1))
1012 then 1
1113 else 0
1315 then 1
1416 else 0
1517 let isMultiSignValid = ((signed1 + signed2) == 2)
18+func isUnlimitedFunction (funcName) = (indexOf(unlimitedFunctions, funcName) != unit)
19+
20+func isLimitedFunction (funcName) = (indexOf(limitedFunctions, funcName) != unit)
21+
1622 match tx {
1723 case t: InvokeScriptTransaction =>
18- let bypassCondition = if ((t.dApp == targetDapp1))
19- then (indexOf(functions1, t.function) != unit)
20- else if ((t.dApp == targetDapp2))
21- then (indexOf(functions2, t.function) != unit)
22- else false
24+ let targetFuncName = t.function
2325 if (isMultiSignValid)
2426 then true
25- else bypassCondition
27+ else if (if ((t.dApp == targetDapp1))
28+ then true
29+ else (t.dApp == targetDapp2))
30+ then if (isUnlimitedFunction(targetFuncName))
31+ then true
32+ else if (isLimitedFunction(targetFuncName))
33+ then if ((t.fee > maxFeePerTx))
34+ then throw("Transaction fee exceeds maximum allowed amount")
35+ else {
36+ let checkLimitResult = ScriptTransfer(securityDapp, 0, unit)
37+ match checkLimitResult {
38+ case checkLimitResult: ScriptTransfer =>
39+ true
40+ case _ =>
41+ throw("Invalid response from security dApp")
42+ }
43+ }
44+ else false
45+ else false
2646 case _ =>
2747 isMultiSignValid
2848 }
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 6 #-}
1+{-# STDLIB_VERSION 8 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
3-let subwarL2_1 = base58'HpeKQu8xawfaxbbTSPNMNqVvWM9xhebUcemDK5REzG2j'
4-let subwarL2_2 = base58'BEVjN4AXKQ2Yw7KS1wiL5DMGg5V9cDniNH7dK2v5d7Ek'
5-let targetDapp1 = value(addressFromString("3Msx4Aq69zWUKy4d1wyKnQ4ofzEDAfv5Ngf"))
3+let subwarL2_1 = base58'6muGj1AZfEJ2jxi2UKUDR8qsEchQtouSycDRaTHXk7Wx'
4+let subwarL2_2 = base58'DstkNBYUaD6nmPrRxSPM3bbv9hsAogWghMzRbPbYTJUj'
5+let targetDapp1 = value(addressFromString("3PKgN8rfmvF7hK7RWJbpvkh59e1pQkUzero"))
66 let targetDapp2 = value(addressFromString("3PJVm7xLPabmYohbnvdgGDYHMwnZxF2x18m"))
7-let functions1 = "extendMainChain,appendBlock,startAltChain,extendAltChain,join,leave,withdraw"
8-let functions2 = "claimLP"
7+let securityDapp = value(addressFromString("3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp"))
8+let unlimitedFunctions = "extendMainChain,appendBlock,startAltChain,extendAltChain"
9+let limitedFunctions = "join,leave,withdraw,claimLP"
10+let maxFeePerTx = 500000
911 let signed1 = if (sigVerify_16Kb(tx.bodyBytes, tx.proofs[0], subwarL2_1))
1012 then 1
1113 else 0
1214 let signed2 = if (sigVerify_16Kb(tx.bodyBytes, tx.proofs[1], subwarL2_2))
1315 then 1
1416 else 0
1517 let isMultiSignValid = ((signed1 + signed2) == 2)
18+func isUnlimitedFunction (funcName) = (indexOf(unlimitedFunctions, funcName) != unit)
19+
20+func isLimitedFunction (funcName) = (indexOf(limitedFunctions, funcName) != unit)
21+
1622 match tx {
1723 case t: InvokeScriptTransaction =>
18- let bypassCondition = if ((t.dApp == targetDapp1))
19- then (indexOf(functions1, t.function) != unit)
20- else if ((t.dApp == targetDapp2))
21- then (indexOf(functions2, t.function) != unit)
22- else false
24+ let targetFuncName = t.function
2325 if (isMultiSignValid)
2426 then true
25- else bypassCondition
27+ else if (if ((t.dApp == targetDapp1))
28+ then true
29+ else (t.dApp == targetDapp2))
30+ then if (isUnlimitedFunction(targetFuncName))
31+ then true
32+ else if (isLimitedFunction(targetFuncName))
33+ then if ((t.fee > maxFeePerTx))
34+ then throw("Transaction fee exceeds maximum allowed amount")
35+ else {
36+ let checkLimitResult = ScriptTransfer(securityDapp, 0, unit)
37+ match checkLimitResult {
38+ case checkLimitResult: ScriptTransfer =>
39+ true
40+ case _ =>
41+ throw("Invalid response from security dApp")
42+ }
43+ }
44+ else false
45+ else false
2646 case _ =>
2747 isMultiSignValid
2848 }

github/deemru/w8io/169f3d6 
22.93 ms