Skip to content

How to withdraw from the smart contract to the wallet #25

@enricocagliari

Description

@enricocagliari

Hi Everyone,

I managed to deploy the smart contract and perform the flash loans. However, I don't know how to withdraw the funds from the smart contract.
Let's talk with the case on hand:

To do the flashloan, funds are transferred from wallet to the contract with transaction https://kovan.etherscan.io/tx/0x9c3d95bd9ddb14e7debfe9153724f7b3aaf0d981b4657d1a000e2d70860eff44 to cover the fees. Then I'm able to execute the flashloan correctly.

However, now the contract has a balance, that should be transferred back to my wallet. So my doubt is:

  • How do I transfer the balance on the contract back to my wallet?
  • Could be that the code is effectively transferring the profit back to the wallet, but I am not seeing it because there is no profit in the transaction I did? It was only the flashloan, so there is a loss for the fees.

Thanks for who can clarify me this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions