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.
transfersEnabled
bool
burnsEnabled
bool
earnedCredits
mapping
totalCredits
uint256
Using the following call method, you can check if transfers are enabled:
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:
State Functions
Privileged roles can call the following functions.
1. mint
This function mints Engen tokens to a specified address. Only the contract owner can call this function.
Function Interface:
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:
_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:
_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:
_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.
1. transfersEnabled
This function checks if transfers are enabled.
Function Interface:
Returns true if transfers are enabled
2. burnsEnabled
This function checks if burning is enabled.
Function Interface:
Returns true if burning is enabled
3. earnedCredits
This function returns the earned credits of a specific wallet.
Function Interface:
account
address
The address of the wallet
4. totalCredits
This function returns the total credits earned by all wallets.
Function Interface:
Returns the total credits
5. getPastVotes
This function returns the past votes of a user at a specific timepoint.
Function Interface:
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:
timepoint
uint256
The timepoint to get the votes at
7. clock
This function returns the current timepoint.
Function Interface:
Returns the current timepoint
8. CLOCK_MODE
This function returns the clock mode.
Function Interface:
Returns the clock mode
Last updated