0

We have been trying to capture funds from a smart contract, that holds the funds. We are getting errors attempting to execute from the Gnosis interface. The transaction has three addresses that have confirmed/signed but when trying to execute, meta mask gives an error. We have tried changing the gas amounts to no avail. If you can help us to execute this transaction and we receive the funds, we will pay $500 for your efforts. Please see screenshots and also transaction link. Error code shown is GS020 on BSC Scan and error 400 is shown on metamask.

BSC Transaction Error Example - not the actual transaction being discussed

Link to Contract code

enter image description here

0

1 Answer 1

2

Your first example tx - is just the OnChain Rejection. The #57 is still pending. The tx calls withdrawFunds() of the contract 0x1D8769b57aaf4E3C0A64fC2f035F1EfA134FE24c. The tx looks good - all requires should be passed - the state is 3 and assetManagerAddress is your multisig.

So despit of the error message in tx simulation, you can click Submit button anyway.

EDIT

Looked into the decompiled code:

def withdrawFund(): # not payable
  require state <= 5
  if state != 3:
      revert with 0, 'ONLY_DURING_SUCCESS'
  if assetManagerAddress != caller:
      revert with 0, 'ONLY_ASSET_MANAGER'
  call assetManagerAddress with:
     value eth.balance(this.address) wei
       gas 2300 * is_zero(value) wei
  if not ext_call.success:
      revert with ext_call.return_data[0 len return_data.size]

but as the gnosis safe emits the Event when the native token(BNB) is received

contract EtherPaymentFallback {
    event SafeReceived(address indexed sender, uint256 value);

    /// @dev Fallback function accepts Ether transactions.
    receive() external payable {
        emit SafeReceived(msg.sender, msg.value);
    }
}

You will get here the Out of Gas error, as 2300 won't be enough to transfer BNB and emit the Event. The most easy solution would be to change the assetManagerAddress to EOA and call the withdrawFund from it, or if you must stay with Multisig as the Manager, you could deploy a new Gnosis Safe implementation, to prevent emitting that Event, or to look into accessList - https://github.com/folia-app/eip-2929

5
  • Thanks for your response. It seems like you might have a good solution. If you are confident this should work, would you be willing to walk us through the process on a video call or something? Again, will pay $500 if it does work. We are a reputable start up. I saw you have a blog site, should I contact you through there?
    – doc8591
    Jan 26, 2023 at 15:40
  • Sure, or you can email me (I've updated my profile page)
    – tenbits
    Jan 26, 2023 at 18:42
  • you can check out this repo github.com/rmeissner/safe-migrator
    – mikheevm
    Jan 27, 2023 at 16:52
  • @tenbits Where do I find your email? I can't seem to locate it
    – doc8591
    Feb 6, 2023 at 20:18
  • @doc8591 ethereum.stackexchange.com/users/68115/tenbits?tab=profile It is in the About section of the Profile page. Stackoverflow doesn't have extra public email section
    – tenbits
    Feb 7, 2023 at 18:22

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.