@@ -6,14 +6,14 @@ methods {
66 // harnessed
77 function signatureSplitPublic ( bytes , uint256 ) external returns ( uint8 , bytes32 , bytes32 ) envfree ;
88 function getCurrentOwner ( bytes32 , uint8 , bytes32 , bytes32 ) external returns ( address ) envfree ;
9+ function getTransactionHashPublic ( address , uint256 , bytes , Enum . Operation , uint256 , uint256 , uint256 , address , address , uint256 ) external returns ( bytes32 ) envfree ;
910 // needed for the getTransactionHash ghost for the execTransaction <> signatures rule
10- // function callKeccak256 ( bytes ) external returns ( bytes32 ) envfree ;
1111
1212 // summaries
1313 function SignatureDecoder . signatureSplit ( bytes memory signatures , uint256 pos ) internal returns ( uint8 , bytes32 , bytes32 ) => signatureSplitGhost ( signatures , pos ) ;
1414 function Safe . checkContractSignature ( address , bytes32 , bytes memory , uint256 ) internal = > NONDET ;
1515 // needed for the execTransaction <> signatures rule
16- function getTransactionHash (
16+ function Safe . getTransactionHash (
1717 address to ,
1818 uint256 value ,
1919 bytes calldata data ,
@@ -24,7 +24,7 @@ methods {
2424 address gasToken ,
2525 address refundReceiver ,
2626 uint256 _nonce
27- ) internal returns ( bytes32 ) => transactionHashGhost ( to , value , data , operation , safeTxGas , baseGas , gasPrice , gasToken , refundReceiver , _nonce ) ;
27+ ) internal returns ( bytes32 ) => CONSTANT ;
2828
2929 // optional
3030 function checkSignatures ( bytes32 , bytes ) external ;
@@ -93,40 +93,38 @@ rule checkSignatures() {
9393}
9494
9595// This rule doesn 't run because of a prover error at the moment .
96- // rule ownerSignaturesAreProvidedForExecTransaction (
97- // address to ,
98- // uint256 value ,
99- // bytes data ,
100- // Enum . Operation operation ,
101- // uint256 safeTxGas ,
102- // uint256 baseGas ,
103- // uint256 gasPrice ,
104- // address gasToken ,
105- // address refundReceiver ,
106- // bytes signatures
107- // ) {
108- // uint256 nonce = nonce ( ) ;
109- // bytes32 transactionHash = getTransactionHash (
110- // to ,
111- // value ,
112- // data ,
113- // operation ,
114- // safeTxGas ,
115- // baseGas ,
116- // gasPrice ,
117- // gasToken ,
118- // refundReceiver ,
119- // nonce
120- // ) ;
121-
122- // env e ;
123- // require e . msg . value == 0 ;
124- // bytes encodedTransactionData ;
125- // require encodedTransactionData . length <= 66 ;
126- // checkSignatures @withrevert ( e , transactionHash , encodedTransactionData , signatures ) ;
127- // bool checkSignaturesOk = !lastReverted ;
128-
129- // execTransaction ( e , to , value , data , operation , safeTxGas , baseGas , gasPrice , gasToken , refundReceiver , signatures ) ;
130-
131- // assert checkSignaturesOk , "transaction executed without valid signatures" ;
132- // }
96+ rule ownerSignaturesAreProvidedForExecTransaction (
97+ address to ,
98+ uint256 value ,
99+ bytes data ,
100+ Enum . Operation operation ,
101+ uint256 safeTxGas ,
102+ uint256 baseGas ,
103+ uint256 gasPrice ,
104+ address gasToken ,
105+ address refundReceiver ,
106+ bytes signatures
107+ ) {
108+ uint256 nonce = nonce ( ) ;
109+ bytes32 transactionHash = getTransactionHashPublic (
110+ to ,
111+ value ,
112+ data ,
113+ operation ,
114+ safeTxGas ,
115+ baseGas ,
116+ gasPrice ,
117+ gasToken ,
118+ refundReceiver ,
119+ nonce
120+ ) ;
121+
122+ env e ;
123+ require e . msg . value == 0 ;
124+ checkSignatures @withrevert ( e , transactionHash , signatures ) ;
125+ bool checkSignaturesOk = !lastReverted ;
126+
127+ execTransaction ( e , to , value , data , operation , safeTxGas , baseGas , gasPrice , gasToken , refundReceiver , signatures ) ;
128+
129+ assert checkSignaturesOk , "transaction executed without valid signatures" ;
130+ }
0 commit comments