SwapBase2

The swapBase2 function sends an application request into the protocol, this application request consists of the amount of the base ETH in which the user wants to swap.

function swapBase2(uint _amount) external;
  • _amount: The amount of asset you want to swap to the base token.

‚Äč

Solidity

CEGORAS egoras = CEGORAS(0xd9E373F....);
require(egoras.swapBase2(50, ), "unable to swap");

Web3

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