The EEGG token is an EIP20 token with additional AccessControl
and Mint/Burn
functionality.
The total supply of the token is 100_000_000, and each token is divisible up to 18 decimal places.
To prevent accidental burns, the token does not allow transfers to the contract itself and to 0x00
.
- Deployments:
- Decimals: 18
- Name: Eegg Token
- Symbol: EEGG
git clone git@github.com:eegggallery/contracts.git
cd contracts
npm install
The repository uses HardHat development environment for Ethereum software.
All necessary commands with their config are prepared and can run directy from npm
, like:
npm run test
npm run gas
npm run build
To merge all imports and produce standalone .sol
files, run:
npm run merge-contracts
To test you can deploy the contract to the localhost
network following these steps:
-
Start a local node:
npm run node
-
In another terminal deploy the contract to the
localhost
network:npx hardhat run scripts/deploy.ts --network localhost
The deployment url
and private key
are securely stored in an environment file .env
.
The repository includes an .env.example
example.
The HardHat hardhat.config.ts
resolves the .env
automatically. So, there is nothing more to do, just edit your .env
.
Supported networks: [Goerli Testnet, Ethereum Mainnet]
You can learn more about other testnets and find links to their faucets on the ethereum.org site.
For Goerli Testnet
, for example, your .env
file should look like this:
GOERLI_API_URL=https://eth-goerli.g.alchemy.com/v2/<your api key>
GOERLI_PRIVATE_KEY=<your private key>
We're using Alchemy, but pointing url to any Ethereum node or gateway would work. Go grab your ALCHEMY_API_KEY and come back.
Compile the Contract using:
npm run build
Deploy the Contract using:
npx hardhat run scripts/deploy.ts --network goerli
The script will output the Contract Address. Copy and paste this address to save it somewhere, you don't want to lose it.
You can check the Contract Address on Goerli etherscan to see that it has been deployed successfully.