SwapBase

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

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

Solidity

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

Web3

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