git clone https://github.com/3nsai/3NS.gitcd smart-contractsnpm i -fCreate a .env file in the smart-contracts directory with the following entries:
DEPLOYER_KEY=your_deployer_private_key
OWNER_KEY=your_owner_private_key
INFURA_API_KEY=your_infura_api_key
BATCH_GATEWAY_URLS=["https://ccip.ens.xyz"]
In hardhat.config.ts, replace the following section with your addresses:
namedAccounts: {
deployer: {
default: `ADDRESS_ASSOCIATED_WITH_DEPLOYER_KEY`,
},
owner: 'ADDRESS_ASSOCIATED_WITH_OWNER_KEY',
}In hardhat.config.ts, add your API keys for smart contracts verification:
etherscan: {
apiKey: {
moonbeam: 'YOUR_MOONBEAM_API_KEY',
moonbaseAlpha: 'YOUR_MOONBASE_ALPHA_API_KEY'
},
}npx hardhat compilenpx hardhat nodenpx hardhat deploy --network <network_name>Example:
npx hardhat deploy --network moonbeam- Ensure you replace all placeholder values in the
.envfile with your actual credentials - Make sure you have sufficient funds in your wallet for deployments on target networks
- The owner key and deployer key should be the same
If you encounter any issues during setup or deployment, please check:
- Node.js version is 18 or higher
- All environment variables are correctly set
- Your wallet has sufficient funds for the target network