I have a Safe with the address 0x143...
This safe has a delegate which is an EOA with public address 0xBEf...
. this delegate should be able to propose a transaction to the safe it was assigned to as a delegate. However I am having problems with the signature.
My current approach is:
- Initialize a protocol kit with the safe owner address (0xBE...) and no signer attached.
- Create the transaction using the protocol kit (0xBE...)
- Extract transaction hash from the transaction using the protocol kit (0xBE...)
- Sign the transaction hash using an ethers wallet loaded with the private key of the delegate (public address 0x14).
- Propose the transaction with the apiKit, example below
const parentSafe = await Safe.init({
provider: RPC_URL,
safeAddress: PARENT_SAFE_ADDRESS,
});
const safeTransaction = await parentSafe.createTransaction({
transactions: topUpTransactions,
});
const safeTxHash = await parentSafe.getTransactionHash(safeTransaction);
const messageArray = ethers.getBytes(safeTxHash);
const senderSignature = await delegateWallet.signMessage(messageArray);
await apiKit.proposeTransaction({
safeAddress: PARENT_SAFE_ADDRESS, // 0x143...
safeTransactionData: safeTransaction.data,
safeTxHash,
senderAddress: signerAddress, // 0xBEf...
senderSignature: senderSignature, // Signed by 0xBEf
});
This result in the error that the signer is not an owner or a delegate.
Signer=0xa4E5aae4C1748cc8CA02985e3907072d02F7666F is not an owner or delegate
The error indicates that the signer was 0xa4E...
. This is not an address that I have seen before.
I have confirmed that the EOA 0xBEf...
is indeed a delegate of the Safe (confirmed in the error message).
I have also confirmed that the recovered address from the signature matches the delegate wallet 0xBEf...
.
Has anyone encountered an error such as this or have some guides or examples on how to propose transaction to a safe through the delegate account?