Skip to content

Commit

Permalink
fix v0.7 testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Nov 25, 2024
1 parent ee3725b commit ec4156e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/src/TestUtils/paymasterV07.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ contract TestPaymasterV07 is IPaymaster {
PackedUserOperation calldata userOp,
bytes32, /*userOpHash*/
uint256 /*requiredPreFund*/
) public pure override returns (bytes memory context, uint256 validationData) {
) public view override returns (bytes memory context, uint256 validationData) {
// Return false if there are paymasterData bytes (this allows us to test failing conditions).
if (userOp.paymasterAndData.length > 20) {
if (userOp.paymasterAndData.length > (20 + 16 + 16)) {
return ("", _packValidationData(true, 0, 0));
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/src/testPaymaster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PAYMASTER_V06_BYTECODE: Hex =
"0x60a0604052348015600f57600080fd5b50604051610457380380610457833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b6080516103cc61008b600039600081816079015261010301526103cc6000f3fe60806040526004361061003f5760003560e01c8063a9a2340914610044578063b0d691fe14610067578063d0e30db0146100b8578063f465c77e146100c0575b600080fd5b34801561005057600080fd5b5061006561005f36600461020d565b50505050565b005b34801561007357600080fd5b5061009b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100656100ee565b3480156100cc57600080fd5b506100e06100db36600461029f565b61016b565b6040516100af9291906102f3565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b15801561015057600080fd5b505af1158015610164573d6000803e3d6000fd5b5050505050565b60606000601461017f610120870187610348565b905011156101ac5761019460016000806101d5565b604080516020810190915260008152925090506101cd565b6101b960008060006101d5565b604080516020810190915260008152925090505b935093915050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b856101fd576000610200565b60015b60ff161717949350505050565b6000806000806060858703121561022357600080fd5b84356003811061023257600080fd5b9350602085013567ffffffffffffffff81111561024e57600080fd5b8501601f8101871361025f57600080fd5b803567ffffffffffffffff81111561027657600080fd5b87602082840101111561028857600080fd5b949760209190910196509394604001359392505050565b6000806000606084860312156102b457600080fd5b833567ffffffffffffffff8111156102cb57600080fd5b840161016081870312156102de57600080fd5b95602085013595506040909401359392505050565b604081526000835180604084015260005b818110156103215760208187018101516060868401015201610304565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b6000808335601e1984360301811261035f57600080fd5b83018035915067ffffffffffffffff82111561037a57600080fd5b60200191503681900382131561038f57600080fd5b925092905056fea26469706673582212202cc9052c32932b54f63f79a93fe575ad7b729758b23c41bc838a11db4ec0665e64736f6c634300081a0033"

const PAYMASTER_V07_BYTECODE: Hex =
"0x60a0604052348015600f57600080fd5b5060405161045f38038061045f833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b6080516103d461008b6000396000818160b1015261017101526103d46000f3fe60806040526004361061003f5760003560e01c806352b7512c146100445780637c627b211461007b578063b0d691fe1461009f578063d0e30db0146100eb575b600080fd5b34801561005057600080fd5b5061006461005f36600461020a565b6100f3565b60405161007292919061025e565b60405180910390f35b34801561008757600080fd5b5061009d6100963660046102b3565b5050505050565b005b3480156100ab57600080fd5b506100d37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610072565b61009d61015c565b60606000601461010660e0870187610350565b905011156101335761011b60016000806101d2565b60408051602081019091526000815292509050610154565b61014060008060006101d2565b604080516020810190915260008152925090505b935093915050565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b1580156101be57600080fd5b505af1158015610096573d6000803e3d6000fd5b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b856101fa5760006101fd565b60015b60ff161717949350505050565b60008060006060848603121561021f57600080fd5b833567ffffffffffffffff81111561023657600080fd5b8401610120818703121561024957600080fd5b95602085013595506040909401359392505050565b604081526000835180604084015260005b8181101561028c576020818701810151606086840101520161026f565b506000606082850101526060601f19601f8301168401019150508260208301529392505050565b6000806000806000608086880312156102cb57600080fd5b8535600381106102da57600080fd5b9450602086013567ffffffffffffffff8111156102f657600080fd5b8601601f8101881361030757600080fd5b803567ffffffffffffffff81111561031e57600080fd5b88602082840101111561033057600080fd5b959860209190910197509495604081013595606090910135945092505050565b6000808335601e1984360301811261036757600080fd5b83018035915067ffffffffffffffff82111561038257600080fd5b60200191503681900382131561039757600080fd5b925092905056fea264697066735822122040d44af97be33b7827e561603507ad2ac2fab7155b4e61e4ab29902f1c6a216664736f6c634300081a0033"
"0x60a0604052348015600f57600080fd5b50604051610520380380610520833981016040819052602c91603c565b6001600160a01b0316608052606a565b600060208284031215604d57600080fd5b81516001600160a01b0381168114606357600080fd5b9392505050565b60805161049561008b6000396000818160b101526101b501526104956000f3fe60806040526004361061003f5760003560e01c806352b7512c146100445780637c627b211461007b578063b0d691fe1461009f578063d0e30db0146100eb575b600080fd5b34801561005057600080fd5b5061006461005f3660046102b8565b6100f3565b604051610072929190610352565b60405180910390f35b34801561008757600080fd5b5061009d610096366004610374565b5050505050565b005b3480156100ab57600080fd5b506100d37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610072565b61009d6101a0565b60606000603461010660e0870187610411565b905011156101775760408051808201909152601581527402830bcb6b0b9ba32b92230ba30973632b733ba341605d1b60208201526101529061014b60e0880188610411565b9050610216565b61015f600160008061025f565b60408051602081019091526000815292509050610198565b610184600080600061025f565b604080516020810190915260008152925090505b935093915050565b60405163b760faf960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b760faf99034906024016000604051808303818588803b15801561020257600080fd5b505af1158015610096573d6000803e3d6000fd5b61025b828260405160240161022c929190610352565b60408051601f198184030181529190526020810180516001600160e01b03166309710a9d60e41b179052610297565b5050565b600060d08265ffffffffffff16901b60a08465ffffffffffff16901b8561028757600061028a565b60015b60ff161717949350505050565b80516a636f6e736f6c652e6c6f67602083016000808483855afa5050505050565b6000806000606084860312156102cd57600080fd5b833567ffffffffffffffff8111156102e457600080fd5b840161012081870312156102f757600080fd5b95602085013595506040909401359392505050565b6000815180845260005b8181101561033257602081850181015186830182015201610316565b506000602082860101526020601f19601f83011685010191505092915050565b604081526000610365604083018561030c565b90508260208301529392505050565b60008060008060006080868803121561038c57600080fd5b85356003811061039b57600080fd5b9450602086013567ffffffffffffffff8111156103b757600080fd5b8601601f810188136103c857600080fd5b803567ffffffffffffffff8111156103df57600080fd5b8860208284010111156103f157600080fd5b959860209190910197509495604081013595606090910135945092505050565b6000808335601e1984360301811261042857600080fd5b83018035915067ffffffffffffffff82111561044357600080fd5b60200191503681900382131561045857600080fd5b925092905056fea2646970667358221220b802a07d1fd4b39888903f1e52b7c7c85b994f8fa04a2327c2b894eec0e9e5c464736f6c634300081a0033"

const publicClient = createPublicClient({
transport: http(ANVIL_RPC),
Expand Down

0 comments on commit ec4156e

Please sign in to comment.