Skip to main content
Post Closed as "Duplicate" by Paul Razvan Berg, natewelch_, CommunityBot
Link to consensys article
Source Link

I recently implemented a withdraw function from my smart contract to a Gnosis Safe address, and I ran into many problems because the Tx was failing due to out of gas.

After many research I finally found out why.

But even with this solution, it was still a challenge to get the funds out of my contract.

So my question is, what is the recommended way to implement withdraw to a Gnosis Safe address? Is there a way to bypass this problem or is it uncircumventable?

UpdateUPDATE 1

This was my "faulty" implementation:

  function withdraw() external onlyOwner {
    payable(vault).transfer(address(this).balance);
  }

UPDATE 2

Very good information here.

Thanks @mikheevm

I recently implemented a withdraw function from my smart contract to a Gnosis Safe address, and I ran into many problems because the Tx was failing due to out of gas.

After many research I finally found out why.

But even with this solution, it was still a challenge to get the funds out of my contract.

So my question is, what is the recommended way to implement withdraw to a Gnosis Safe address? Is there a way to bypass this problem or is it uncircumventable?

Update

This was my "faulty" implementation:

  function withdraw() external onlyOwner {
    payable(vault).transfer(address(this).balance);
  }

I recently implemented a withdraw function from my smart contract to a Gnosis Safe address, and I ran into many problems because the Tx was failing due to out of gas.

After many research I finally found out why.

But even with this solution, it was still a challenge to get the funds out of my contract.

So my question is, what is the recommended way to implement withdraw to a Gnosis Safe address? Is there a way to bypass this problem or is it uncircumventable?

UPDATE 1

This was my "faulty" implementation:

  function withdraw() external onlyOwner {
    payable(vault).transfer(address(this).balance);
  }

UPDATE 2

Very good information here.

Thanks @mikheevm

Source Link

What is the recommended way to implement `withdraw` to a Gnosis Safe?

I recently implemented a withdraw function from my smart contract to a Gnosis Safe address, and I ran into many problems because the Tx was failing due to out of gas.

After many research I finally found out why.

But even with this solution, it was still a challenge to get the funds out of my contract.

So my question is, what is the recommended way to implement withdraw to a Gnosis Safe address? Is there a way to bypass this problem or is it uncircumventable?

Update

This was my "faulty" implementation:

  function withdraw() external onlyOwner {
    payable(vault).transfer(address(this).balance);
  }