Backend

General Requirements

The entry point for the entire protocol is the Protocol.sol contract. The backend will call the same function within the Protocol contract, namely:

execute()

Type
Name
Description

string

module name

The name of the module being called

uint256

value

The ETH value being sent (0 if none)

bytes

data

The abi.encoded data for actual function call

Enum.Operation

operation

The ENUM representation of the type of call being made

In order to send the required data, the "data" param will need to be encoded. An example of this is:

data = abi.encodeWithSignature(
"onBoard(uint256, uint256, string, address), 
value, txGas, lenderName, user
);

Utilizing Python Web3.py, the above encoding would look similar to:

contract.encodeABI(fn_name="onBoard", args=[value, txGas, lenderName, user])

Last updated