EngenCredits

Deployment Address:

Mainnet: 0xD1295F0d8789c3E0931A04F91049dB33549E9C8F

Interface: IEngenCredits.sol


Basics

This contracts holds Engen Credits minting and setup mechanisms

State Variables

These are the key state variables used in the contract.

NameType

transfersEnabled

bool

burnsEnabled

bool

earnedCredits

mapping

totalCredits

uint256

Using the following call method, you can check if transfers are enabled:

transfersEnabled()

Earned Credits

Each wallet can earn credits based on their activity. These credits can be managed using the setCredits method.

For example, to set the earned credits for multiple wallets:

setCredits(<WALLETS>, <POINTS>)

State Functions

Privileged roles can call the following functions.


function mint(address to, uint256 amount) external;

function setTransfersEnabled(bool _transfersEnabled) external;

function setBurnsEnabled(bool _burnsEnabled) external;

function setCredits(address[] calldata _wallets, uint256[] calldata _points) external;

1. mint

This function mints Engen tokens to a specified address. Only the contract owner can call this function.

Function Interface:

function mint(address to, uint256 amount) external;
ParameterTypeExplanation

to

address

The address to mint tokens to

amount

uint256

The amount of tokens to mint


2. setTransfersEnabled

This function enables or disables the transfer of Engen tokens. Only the contract owner can call this function.

Function Interface:

function setTransfersEnabled(bool _transfersEnabled) external;
ParameterTypeExplanation

_transfersEnabled

bool

True if transfers should be enabled


3. setBurnsEnabled

This function enables or disables the burning of Engen tokens. Only the contract owner can call this function.

Function Interface:

function setBurnsEnabled(bool _burnsEnabled) external;
ParameterTypeExplanation

_burnsEnabled

bool

True if burning should be enabled


4. setCredits

This function sets the earned credits for multiple wallets. Only the contract owner can call this function.

Function Interface:

function setCredits(address[] calldata _wallets, uint256[] calldata _points) external;
ParameterTypeExplanation

_wallets

address[] calldata

The wallet addresses of the users

_points

uint256[] calldata

The credits earned by each user


View Functions

Anyone can call the following functions without a transaction to retrieve information from the contract.

function transfersEnabled() external view returns (bool);

function burnsEnabled() external view returns (bool);

function earnedCredits(address account) external view returns (uint256);

function totalCredits() external view returns (uint256);

function getPastVotes(address account, uint256 timepoint) external view returns (uint256);

function getPastTotalSupply(uint256 timepoint) external view returns (uint256);

function clock() external view returns (uint48);

function CLOCK_MODE() external pure returns (string memory);

1. transfersEnabled

This function checks if transfers are enabled.

Function Interface:

function transfersEnabled() external view returns (bool);
ParameterTypeExplanation

Returns true if transfers are enabled

2. burnsEnabled

This function checks if burning is enabled.

Function Interface:

function burnsEnabled() external view returns (bool);
ParameterTypeExplanation

Returns true if burning is enabled


3. earnedCredits

This function returns the earned credits of a specific wallet.

Function Interface:

function earnedCredits(address account) external view returns (uint256);
ParameterTypeExplanation

account

address

The address of the wallet


4. totalCredits

This function returns the total credits earned by all wallets.

Function Interface:

function totalCredits() external view returns (uint256);
ParameterTypeExplanation

Returns the total credits


5. getPastVotes

This function returns the past votes of a user at a specific timepoint.

Function Interface:

function getPastVotes(address account, uint256 timepoint) external view returns (uint256);
ParameterTypeExplanation

account

address

The address of the user

timepoint

uint256

The timepoint to get the votes at


6. getPastTotalSupply

This function returns the total supply of votes at a specific timepoint.

Function Interface:

function getPastTotalSupply(uint256 timepoint) external view returns (uint256);
ParameterTypeExplanation

timepoint

uint256

The timepoint to get the votes at


7. clock

This function returns the current timepoint.

Function Interface:

function clock() external view returns (uint48);
ParameterTypeExplanation

Returns the current timepoint


8. CLOCK_MODE

This function returns the clock mode.

Function Interface:

function CLOCK_MODE() external pure returns (string memory);
ParameterTypeExplanation

Returns the clock mode

Last updated