1.1.1 • Published 10 months ago
gaib-core v1.1.1
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 documentationThis 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).
Contract deployment document
For detailed deployment instructions, please refer to the https://github.com/gaib-ai/gaib-core/blob/master/deployDocument.mdInstall Dependencies
npm iBuild Contracts and Generate Typechain Typeings
npm run buildRun Contract Tests
npm run testRun Coverage Report for Tests
npm run coverageDeploy 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 deployGenerate Flattened Contract
npm run flattenRun Scripts on Server
pm2 startCheck Scripts Logs on Server
pm2 logs