d
d
docs
Search…
Token.sol

A data storage for EGT (Elastic Governance Token)

The Token contract is used for storing token data.
The Token contract is used for storing token data, it inherits the EternalModel contract. The EternalModel contract is an implementation of the Eternal Storage pattern.
The Token contract inherits the EternalModel contract. The EternalModel contract is an implementation of the Eternal Storage pattern.
1
struct Instance {
2
address uuid;
3
string name;
4
string symbol;
5
uint256 eByL;
6
uint256 elasticity;
7
uint256 k;
8
uint256 lambda;
9
uint256 m;
10
uint256 maxLambdaPurchase;
11
uint256 numberOfTokenHolders;
12
Ecosystem.Instance ecosystem;
13
}
Copied!
The Token contract consists of a struct of parameters that can be set while deploying the DAO
    uuid - is an address of the unique user ID
    name - is the name of the token
    symbol - is the symbol of the token
    eByL - During the seeding phase, eByL is the value which determines how many lambda(λ) a summoner gets.
    elasticity - is the value by which the cost of entering the DAO increases ( on every join )
    k - is the constant token multiplier, it increases the number of tokens that each member of the DAO has with respect to their lambda
    lambda - the base value of the governance token
    m - is a lambda modifier it's value increases every time someone joins the DAO
    maxLambdaPurchase - is the maximum amount of lambda that can be purchased per wallet
    numberOfTokenHolders - is an index indicating the number of token holders
    ecosystem - is the DAO ecosystem
1
struct Instance {
2
address uuid;
3
string name;
4
string symbol;
5
uint256 eByL;
6
uint256 elasticity;
7
uint256 k;
8
uint256 lambda;
9
uint256 m;
10
uint256 maxLambdaPurchase;
11
uint256 numberOfTokenHolders;
12
Ecosystem.Instance ecosystem;
13
}
Copied!

Functionality

    uuid - the unique address of the Token
    name - The name of the Token
    symbol - The symbol of the Token
    counter -
    eByL - During the seeding phase, eByL is the value which determines how many lambda(λ) a summoner gets.

List of events:

List of functions:

Events

Serialized

1
event Serialized(address indexed uuid);
Copied!

Functions

deserialize

Translates the data from the key-value pairs to a struct
1
function deserialize(address _uuid, Ecosystem.Instance memory _ecosystem) external view returns (Instance memory record) {...}
Copied!

parameters

1
@param _uuid - address of the unique user ID
Copied!

exists

Checks if the address already exists in the DAO (externally)
1
function exists(address _uuid, Ecosystem.Instance memory) external view returns (bool)
Copied!

parameters

1
@param _uuid - address of the unique user ID
Copied!

serialize

Translates the data from the concerned struct to key-value pairs
1
function serialize(Instance memory _record) external preventReentry {...}
Copied!

parameters

1
@param _record - Instance
Copied!

UpdateNumberOfTokenHolders

Updates the number of token holders
1
function updateNumberOfTokenHolders(Instance memory _record, uint256 numberOfTokenHolders)
Copied!

parameters

1
@param _record - Instance
Copied!

_exists

Checks if the address already exists in the DAO (internally)
1
function _exists(address _uuid) internal view returns (bool) {...}
Copied!
Last modified 7mo ago