Repay Loan

The repayLoan function transfers an asset into the protocol, reducing the organisation's borrow balance.

function repayLoan(uint _loanID) external;
  • _loanID: The unique identifier of every loan emitted from Egoras Microfinance protocol.

Solidity

CEGORAS egoras = CEGORAS(0x7a24C....);
require(egoras.repayLoan(“20"), "unable to repay loan");

Web3

const instance = await new web3.eth.Contract(abi, address)
await instance.methods.repayLoan("20").send({from: 0xMyAccount});