safe-global / safe-core-sdk

The Safe{Core} SDK allows builders to add account abstraction functionality into their apps.
https://docs.safe.global/sdk/overview
MIT License
256 stars 203 forks source link

Revert with `GS025` despite transaction being approved #199

Open thomas-waite opened 2 years ago

thomas-waite commented 2 years ago

Description

I am forking mainnet and getting a revert GS025 for a 5 of 9 Gnosis Safe when using the Core SDK.

I have created the safe with the sdk and instantiated 5 versions of the SDK with the different safe Owners. I then retrieve the transaction hash and call approveTransactionHash(). It looks like the below:

const safeTx = await sdk1.createTransaction(txArgs);
const txHash = await sdk1.getTransactionHash(safeTx);
const approveTx = await sdk1.approveTransactionHash(safeTx);

..... and so on

I then check that the approvals is as expected (getOwnersWhoApprovedTx(safeTx)) and there are 5. However when I then executeTransaction() it reverts with GS025 - indicating the hash was incorrect. The nonce of the safe and the signed transaction is 0.

I'm not sure why as all the approvals are as expected. Would appreciate any help!

Environment

Can't find a Discord invite - will happily join and ask in supprot

DecoratedWings commented 2 years ago

Hi,

I have the same exact issue currently for my project, I only found 1 other post on this in regards to passing in a nonce: https://ethereum.stackexchange.com/questions/116968/gs025-error-when-executing-gnosis-safe-multisig-transaction

I am not passing a nonce in the txn proposal but I still have the issue with GS025.

I raised an issue on stack exchange earlier today before finding this issue you have raised:https://ethereum.stackexchange.com/questions/132021/gs025-hash-has-not-been-approved-gnosis

Additionally gnosis-safe discord is here: https://discord.com/invite/AjG7AQD9Qn

Hopefully devs can help resolve this issue.

Thanks!