Swap

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

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

Solidity

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

Web3

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