Smart contracts for the Crypticorn ecosystem including the BEP20 token and staking platform.
- BEP20 token with advanced features
- Automatic liquidity provision
- Marketing wallet integration
- Tax system for buys/sells
- Multi-pool staking system for Crypticorn tokens
- 3 different staking pools with varying lock periods and APY rates
- Pool 1: No lock period, 2% APY
- Pool 2: 90-day lock, 10% APY
- Pool 3: 180-day lock, 15% APY
- Owner fee withdrawal capabilities
- Automatic reward calculation and claiming
- BSC deployment ready with verification
- Automatic TypeScript ABI generation
- Comprehensive deployment scripts
- Multi-contract deployment support
- Install dependencies:
pnpm install- Copy environment file and configure:
cp env.example .env- Fill in your
.envfile:
PRIVATE_KEY=your_wallet_private_key_without_0x
BSCSCAN_API_KEY=your_bscscan_api_key
# For token deployment
MARKETING_WALLET=your_marketing_wallet_address
TOKEN_NAME=Crypticorn
TOKEN_SYMBOL=CRYPTO
# For staking-only deployment with existing token
TOKEN_ADDRESS=your_existing_token_contract_address# Deploy both contracts in sequence
pnpm deploy:testnet # or deploy:mainnetpnpm deploy:token:testnet # or deploy:token:mainnetpnpm deploy:staking:testnet # or deploy:staking:mainnetAll deployment scripts automatically verify contracts on BSCScan. For manual verification:
# Token contract
npx hardhat verify --network bscMainnet TOKEN_ADDRESS "MARKETING_WALLET" "TOKEN_NAME" "TOKEN_SYMBOL"
# Staking contract
npx hardhat verify --network bscMainnet STAKING_ADDRESS TOKEN_ADDRESSAfter compilation, build artifacts are located in:
artifacts/contracts/Crypticorn.sol/Crypticorn.json- Token contract ABI and bytecodeartifacts/contracts/CrypticornStaking.sol/CrypticornStaking.json- Staking contract ABI and bytecodeartifacts/generated-src/Crypticorn.ts- Token TypeScript ABI export (auto-generated)artifacts/generated-src/CrypticornStaking.ts- Staking TypeScript ABI export (auto-generated)
The TypeScript ABI files export contract ABIs as const and can be imported directly:
import CrypticornABI from './artifacts/generated-src/Crypticorn';
import CrypticornStakingABI from './artifacts/generated-src/CrypticornStaking';
// Both ABIs contain full ABI with TypeScript type safetypnpm compile- Compile contracts and generate TypeScript ABIspnpm generate-abis- Generate TypeScript ABI files from compiled artifactspnpm deploy:testnet- Deploy full ecosystem to BSC Testnetpnpm deploy:mainnet- Deploy full ecosystem to BSC Mainnetpnpm deploy:token:testnet- Deploy only token to BSC Testnetpnpm deploy:token:mainnet- Deploy only token to BSC Mainnetpnpm deploy:staking:testnet- Deploy only staking to BSC Testnetpnpm deploy:staking:mainnet- Deploy only staking to BSC Mainnetpnpm test- Run tests
To best take advantage of shell completions, install the Fish shell and type:
npm run [TAB]
- RPC: https://bsc-dataseed1.binance.org
- Chain ID: 56
- Explorer: https://bscscan.com
- RPC: https://data-seed-prebsc-1-s1.binance.org:8545
- Chain ID: 97
- Explorer: https://testnet.bscscan.com
- Never commit your
.envfile - Keep your private key secure
- Test on testnet before mainnet deployment
- Verify contract source code on BSCScan after deployment