-
We cloned OpenZeppelin Contracts v3 code for
SafeMath
,ERC20
andERC20Burnable
logic.SafeMath
provides arithmetic functions that throw exceptions when integer overflows occur.ERC20
provides a basic implementation of the ERC20 standardERC20Burnable
provides a burning function that decrement the balance of the burner and the total supplyMintableToken
provides the token a mintable ability in order to generate the supply
-
We cloned OpenZeppelin Contracts v3 code for
Ownable
and added some logic.Ownable
keeps track of a contract owner and permits the transfer of ownership by the current owner- This part of the logic originally propose a straight method named
renounceOwnership
. - We've enhanced this part of the contract's logic by adding a new layer of security materialized by a new method allowing the current owner to definitively relinquish control of the contract in a safe way.
- This safe check mechanism has been implemented to absolutely avoid situations where a method is unwantely called which could potentially lock the all ecosystem permanently.
- To make sure this will never happens, we've defined the standalone release process in 2 steps :
- First, the owner calls
preRenounceOwnership
method to generate, store and retrieve an hexadecimal random key namedrelinquishmentToken
. - In a second time, the owner calls
renounceOwnership
method withrelinquishmentToken
to renounce to his ownership and set the standalone state to true.
- First, the owner calls
- This part of the logic originally propose a straight method named
ERC20Capped
provides a way to add a cap to the supply of tokens ensuring overflow will never happen- Constructor has been replaced by a method called
setImmutableCap
that is called during contract migration (see Flow section of Etherland.sol definition down below) - Internal calls to
_beforeTokenTransfer
are made toERC20.sol
- Constructor has been replaced by a method called
-
LandRegistry.sol
Etherland Decentralized Land Registration Protocol- Uses
iLANDID.sol
interface to get the ability to call thehasAdminRights
function of Etherland LANDID Non-Fungible-Token smart-contract at address retrievable with thelandidNftAddress
getter function. - On the Etherland Metaverse, any token holder has the ability to register a new land, to do so, they must exchange ELAND Ethereum or any other Token displayed on the offer of Opensea marketplace.
- Land Record Rights offers and prices are in ELAND or ETH or other Tokens.
- Those rights are detailed on our website at https://etherland.io/dashboard/?ua=newitem
REGISTER A NEW LAND
request the mint of an Etherland LANDID Non-Fungible-Token use-case- Making a new record in the Land Registry is doable in a few simple steps :
- Select a
Record Right
among the offers at https://etherland.world/register-a-place/ - Fill the form and validate all record steps
- Validate purchase: A transaction calling the function
registerLand
is prompted and must be accepted/successfull - Corresponding
Record Right
is attributed to the caller and safely stored on-chain - Etherland administrator validates the record and mints the corresponding LANDID NFT which caller becomes the owner
- Etherland administrator consumes the corresponding
Record Right
by calling the functionconsumeRecordRight
giving a tokenId - Operation is successfull : a new unique LANDID NFT has been minted which caller is the owner
- Uses
-
Etherland.sol
contract assembling the code for Etherland logic-
IDENTIFICATION
- Name : Etherland
- Symbol : ELAND
- Decimals : 18
-
CAP The maximum amount of ELAND tokens the contract will ever mint
- 1 000 000 000 (1 Billion) units
-
TOTAL SUPPLY A total available supply of ELAND (will never be higher than the Maximum Supply)
- starting at capped value of 1 000 000 000 (1 Billion) units
- may be lower than the Cap along with the burn operations
-
CIRCULATING SUPPLY The number of circulating ELAND : = totalSupply - team and advisors - reserve - Etherland wallet - Credit carbon reward
-
MINTING FINISHED In concern for transaprency, we've made available a getter returning a boolean that must be positive with value "true", indicating that its programmatically impossible to mint more tokens than the cap
-
BURN
- Any token holder has the ability to burn its own tokens,
- Burn operations remove the tokens from the total supply
-
APPROVE
- Any token holder has the ability to allow a tiers to spend/burn its own tokens
-
LAND REGISTRY see LandRegistry definition above
- Maximum supply is pre-minted
- Address of the contract owner is initialized
- Supply is partionnalized and distributed to 3 different wallets :
- Team wallet : 10% of the maximum supply is allocated to the team
- Reserve : 20% of the maximum supply is allocated to the reserve
- Owner : 70% of the maximum supply is transfered to the contract owner
- Minting is definitvely closed assuring that no more tokens than the maximum supply will be minted
-
after having installed dependencies :
- install yarn running commant
yarn install
- run command
yarn test
- If its not done yet, install truffle globally on your system, run
npm install -g truffle
in a terminal - Create or update the
.env
file at the root of the project with the following environnement variables :OWNER_LIVE
: the public address of the contract owner to use on mainnetOWNER_TEST
: the public address of the contract owner to use on testnet (rinkeby only)RESERVE_WALLET
: the address to use as the reserve wallet for partionningTEAM_WALLET
: the address to use as the team wallet for partionningDEPLOY_ETHERLAND_ERC20
: a boolean to allow the deployment flow, set totrue
if you allow deployment orfalse
otherwiseMNEMONIC
: seed words separated with a spaceINFURA_KEY
: goto https://infura.io to get an access key
- Open a terminal at root and run :
- for Rinkeby : truffle deploy --network rinkeby
- for Mainnet : truffle deploy --network live
- npm : 6.14.8
run
npm install -g npm@6.14.8
- node : 14.15.0
run
nvm use 14.15.0
contact: info@etherland.world