Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ghost summary for getTransactionHash() #702

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions certora/specs/Signatures.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ methods {
function SignatureDecoder.signatureSplit(bytes memory signatures, uint256 pos) internal returns (uint8,bytes32,bytes32) => signatureSplitGhost(signatures,pos);
function Safe.checkContractSignature(address, bytes32, bytes memory, uint256) internal => NONDET;
// needed for the execTransaction <> signatures rule
// function getTransactionHash(
// address to,
// uint256 value,
// bytes data,
// Enum.Operation operation,
// uint256 safeTxGas,
// uint256 baseGas,
// uint256 gasPrice,
// address gasToken,
// address refundReceiver,
// uint256 _nonce
// ) external returns (bytes32) => transactionHashGhost(to, value, callKeccak256(data), operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) ;
function getTransactionHash(
address to,
uint256 value,
bytes calldata data,
Enum.Operation operation,
uint256 safeTxGas,
uint256 baseGas,
uint256 gasPrice,
address gasToken,
address refundReceiver,
uint256 _nonce
) internal returns (bytes32) => transactionHashGhost(to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) ;

// optional
function checkSignatures(bytes32,bytes) external;
Expand All @@ -38,17 +38,17 @@ ghost mapping(bytes => mapping(uint256 => bytes32)) mySigSplitR;
ghost mapping(bytes => mapping(uint256 => bytes32)) mySigSplitS;

// This is needed for the execTransaction <> signatures rule
// ghost transactionHashGhost(
// address /*to */,
// uint256 /*value */,
// bytes32,
// Enum.Operation /*operation*/,
// uint256 /*safeTxGas */,
// uint256 /*baseGas*/,
// uint256 /*gasPrice*/,
// address /*gasToken*/,
// address /*refundReceiver*/,
// uint256 /*_nonce*/ ) returns bytes32 ;
ghost transactionHashGhost(
address /*to */,
uint256 /*value */,
bytes,
Enum.Operation /*operation*/,
uint256 /*safeTxGas */,
uint256 /*baseGas*/,
uint256 /*gasPrice*/,
address /*gasToken*/,
address /*refundReceiver*/,
uint256 /*_nonce*/ ) returns bytes32 ;

function signatureSplitGhost(bytes signatures, uint256 pos) returns (uint8,bytes32,bytes32) {
return (mySigSplitV[signatures][pos], mySigSplitR[signatures][pos], mySigSplitS[signatures][pos]);
Expand Down
Loading