Skip to content

Brillionfi/Brillion-ERC20-Token

 
 

Repository files navigation

Brillion Token

BRLN token contract

An upgradable ERC20 contract owned by a multi-signature wallet. Also, it allows creating snapshots, pausing it, support (EIP-2612)[https://eips.ethereum.org/EIPS/eip-2612] and batch minting.

Env variables

You will need to generate a .env file using .env.example as a boilerplate. PrivateKey or Mnemonic is necessary for live deployment but can be skipped for local development. SALT is needed for deterministic deployment, if none is provided it will use the default form constants.

Usage

Need node 18 installed and yarn. First, install the dependencies

yarn install

Then compile the contracts to get types from typechain

yarn compile

To run tests use

yarn test

It will also show gas used

To check converage run

yarn coverage

Deploy

To deploy use

yarn deploy <NetworkName>

Where NetworkName is one of the networks configured in (hardhat.networks.ts)[./hardhat.networks.ts] Deployment is deterministic, this means that it can be precalculated and that it will have the same address across all chains. Important to keep the same address, SALT and BYTECODE must be the same, bytecode includes not just the compiled contracts, but the parameters used in the constructor as well

Verification

The deployment script also verifies the smart contracts using hardhat-etherscan, but it needs the API KEY from the explorers, you will need to add them in the .env file.

If the network where you are deploying uses Blockscout, use Sourcify instead.

yarn hardhat --network <NetworkName> sourcify

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.0%
  • Solidity 13.0%