Total newbie here. So I deployed a contract and already did the flash loan, but now I want to withdraw the remaining funds that I deposited into the smart contract (for the premium fee). How do I actually execute this function, and where do I do it?
Do I just throw this function in a script and run it, do I somehow call the function in the terminal?
On etherscan, I was looking for the write section of my contract but I couldn't find the ability to withdraw the funds from there, so I am just a bit confused as to how I can actually interact with this contract. (i.e transferOwnership, withdraw, transferFrom, etc…)
Here is a pic of the withdraw code
And here is how the architecture of the code is
Best Answer
If you want to do a transaction with a deployed smart contract, you need to interact with it on the blockchain level. There is many ways to do it. For example you can use MyEtherWallet.
You can deploy your contract on MainNet (it cost you ETH), but there is other testnet network such as Ropsten. You can also upload it into a local blockchain with RemixIDE (browser) or Geth etc.
MyEtherWallet can handle data to "make" the transaction on any network. But you need two parameters :
Then you need a wallet that secure your private key to "sign" this transaction and send it to the network.