Background
Based on this guide, https://docs.safe.global/sdk/relay-kit/guides/4337-safe-sdk#create-a-user-operation, there is a part where it says
By default, the transaction fees will be paid in the native token and extracted from the Safe account, so there must be enough funds in the Safe address.
What I want is to have the Safe pay for the gas fees in a transaction. I am interacting with the Safe4337Pack since we want to sponsor the deployments of the Safes for our users.
Case
In a scenario where the Safes are always with a threshold larger than 1, the first signer would do:
const safeTransaction = await safe4337.createTransaction({ transactions: [safeTransactionData] })
const signedTransaction = await safe4337.signSafeOperation(safeTransaction)
And then - rightfully - I can't use this function safe4337.**executeTransaction**({ executable: signedTransaction})
since it, correctly, returns an error because the signedTransaction has only one signature.
However, what I need is to be able to first propose that transaction to the Safe Service and then have the other signer add a confirmation to that safe_operation_hash
.
The this is that I can't send that operation to the Safe Service because the next signature will come at a later point.
I am trying to follow the recommendation on Safe of doing PCE (Propose, Confirm, Execute) but the issue here is that I can't propose a transaction with the Safe4337Pack is the threshold is larger than 1
.
Bear in mind that I am using the Safe4337Pack to have the Safe pay for the gas fees... otherwise, I would have just used the protocolKit and then propose the transaction using the apiKit.
Any ideas on how to solve this?