I am trying to signMessage with the EOA owner of the safe wallet.

const message = "hello"
const wallet = new ethers.Wallet(privateKey, provider);
const signature = await wallet.signMessage(ethers.hexlify(ethers.toUtf8Bytes(message)))

And using isValidSignature to verify the message.

await smartWalletContract.isValidSignature(ethers.hashMessage(message), signature);

But validation reverts with this error

'execution reverted: "GS026" (action="call", data="0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000054753303236000000000000000000000000000000000000000000000000000000", reason="GS026", transaction={ "data": "0x20c13b0b00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000002050b2c43fd39106bafbba0da34fc430e1f91e3c96ea2acee2bc34119f92b3775000000000000000000000000000000000000000000000000000000000000000416b922a6fb251cefdb8c9c4484781a58efd41c681aea94ee6c55044f9de53bb696e48c77c3498aab3565c4bf8fe5278cea80b944237f091c566320b1c1aafca241b00000000000000000000000000000000000000000000000000000000000000", "to": "0x82a6b139cE50B5e7974cDe1068343f43B0CA1D48" }, invocation=null, revert={ "args": [ "GS026" ], "name": "Error", "signature": "Error(string)" }, code=CALL_EXCEPTION, version=6.11.1)'

I am on Mumbai Network

Safe Address: 0x82a6b139cE50B5e7974cDe1068343f43B0CA1D48

EOA owner signing the message: 0x1dE58d46D05a379e020b1cBED0Db98a2F55831B2

Checked using the getOwners on safe address, safe owner: 0x1dE58d46D05a379e020b1cBED0Db98a2F55831B2

I ensured that the owner is right, so GS026: Invalid owner provided error is not making sense, please help me with this issue.

Let me know if I am doing something wrong with the message to sign.

1 Answer 1


It might appear illogical at first, but this error does make sense: contracts check signatures and derives an EOA that it compares to the list of owners. If the signature is wrongly formatted, the contract will consider it's a different address trying to interact with the safe, and then throw this error - instead of indicating that the signature is wrongly formatted.

To fix your implementation, you can try to use this method from Safe{Core} SDK protocol kit instead of ethers.hexlify(ethers.toUtf8Bytes(message))

You can also try following this tutorial from the protocol kit documentation dedicated to signing ECDSA messages.

Hope it helps! Best, Louis

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.