gaib-core
v1.1.0
Published
``` project-root/ │ ├── contracts/ # Smart contract source files │ ├── interfaces/ # Contract interfaces │ └── libraries/ # Reusable contract libraries │ ├── scripts/ # Deployment and interaction scripts │ ├── test
Downloads
211
Readme
Project Structure
project-root/
│
├── contracts/ # Smart contract source files
│ ├── interfaces/ # Contract interfaces
│ └── libraries/ # Reusable contract libraries
│
├── scripts/ # Deployment and interaction scripts
│
├── test/ # Test files for smart contracts
│
├── typechain/ # Generated TypeScript typings
│
├── .env # Environment variables (gitignored)
├── .gitignore # Specifies intentionally untracked files to ignore
├── hardhat.config.ts # Hardhat configuration file
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript compiler options
└── README.md # Project documentation
This structure organizes the project into several key directories:
contracts/
: Contains all Solidity smart contract files.scripts/
: Includes scripts for deploying contracts and interacting with them.test/
: Houses all test files for the smart contracts.typechain/
: Stores automatically generated TypeScript typings for the contracts.
Configuration files like hardhat.config.ts
, package.json
, and tsconfig.json
are in the root directory, along with the .env
file for environment variables (which should not be committed to version control).
Install Dependencies
npm i
Build Contracts and Generate Typechain Typeings
npm run build
Run Contract Tests
npm run test
Run Coverage Report for Tests
npm run coverage
Deploy and Verify to Bsc-Testnet
Create a new .env
file in the root directory, and put your PRIVATE_KEY and BSCSCAN_API_KEY in it.
If you do not have BSCSCAN_API_KEY, go to https://etherscan.io/myapikey
and add one.
PRIVATE_KEY = <Your Private Key>
BSCSCAN_API_KEY = <Your Bscscan Api Key>
And then run:
npm run deploy
Generate Flattened Contract
npm run flatten
Run Scripts on Server
pm2 start
Check Scripts Logs on Server
pm2 logs