Withdraw Liquidity(ETH)

The withdraw1 function sends an application request into the protocol, this application request consists of the amount in the user wants to withdraw, the address of which the users wants to transfer the asset and the market of which the asset is locked.

function withdraw1(address payable _to, uint _amount, bool _isMarket) external;
  • _to: Withdraw to the address of the user. The withdrawal address could be the address of the user or any address provided by the user.

  • _amount: The amount of asset you want to withdraw from the pool.

  • _isMarket: true if the asset is a base market and false if the asset is the Token

Solidity

CEGORAS egoras = CEGORAS(0xd9E373F....);
require(egoras.withdraw1(0xd9E373F.,50,true/false ), "unable to withdraw");

Web3

const instance = await new web3.eth.Contract(abi, address)
await instance.methods.withdraw1("0xd9E373F.,50,true/false").send({from: 0xMyAccount});
Contents
Solidity
Web3