5.8 KiB
LINK Token Deployment Readiness Report
Date: 2025-12-24
ChainID: 138
Status: ✅ READY FOR DEPLOYMENT
Test Results Summary
✅ Passed Tests
-
Environment Variables
- ✅ PRIVATE_KEY: Valid and configured
- ✅ Deployer Address:
0x4A666F96fC8764181194447A7dFdb7d471b301C8 - ✅ RPC_URL:
http://192.168.11.250:8545
-
Network Connectivity
- ✅ RPC accessible (block: 175408+)
- ✅ Chain ID matches (138)
-
Deployer Account
- ✅ Balance: 999,630,748.4 ETH (more than sufficient)
- ✅ Nonce: 50
-
Contract Files
- ✅ MockLinkToken.sol found at:
/home/intlc/projects/smom-dbis-138/contracts/tokens/MockLinkToken.sol - ✅ DeployMockLinkToken.s.sol found at:
/home/intlc/projects/smom-dbis-138/script/DeployMockLinkToken.s.sol
- ✅ MockLinkToken.sol found at:
-
Foundry Installation
- ✅ Foundry installed
- ✅ Cast installed
-
Deployment Scripts
- ✅
scripts/force-deploy-link.sh- Ready - ✅
scripts/deploy-link-token.sh- Ready - ✅
scripts/deploy-via-rpc-json.sh- Ready
- ✅
⚠️ Warnings
-
Contract Compilation
- ⚠️ Direct compilation in source project may require dependencies
- ✅
force-deploy-link.shcreates standalone contract (no dependencies needed)
-
Existing LINK Token
- ⚠️ LINK_TOKEN configured in .env:
0xd6969bC19b53f866C64f2148aE271B2Dae0C58E4 - ⚠️ Contract not found on-chain (previous deployment attempt failed)
- ⚠️ LINK_TOKEN configured in .env:
Contract Specification
MockLinkToken Contract
Location: /home/intlc/projects/smom-dbis-138/contracts/tokens/MockLinkToken.sol
Properties:
- Name: "Chainlink Token"
- Symbol: "LINK"
- Decimals: 18
- Type: ERC20 (minimal implementation)
Functions:
mint(address to, uint256 amount)- Mint tokenstransfer(address to, uint256 amount)- Transfer tokenstransferFrom(address from, address to, uint256 amount)- Transfer fromapprove(address spender, uint256 amount)- Approve spenderbalanceOf(address)- Get balanceallowance(address owner, address spender)- Get allowancetotalSupply()- Get total supply
Initial Supply: 1,000,000 LINK (1M) minted to deployer
Deployment Methods
Method 1: Using force-deploy-link.sh (Recommended)
This script creates a standalone contract and deploys it:
cd /home/intlc/projects/proxmox/explorer-monorepo
./scripts/force-deploy-link.sh [GAS_PRICE]
Example:
./scripts/force-deploy-link.sh 20000000000 # 20 gwei
Advantages:
- ✅ No external dependencies
- ✅ Creates contract inline
- ✅ Multiple deployment methods (forge script, forge create, cast send)
- ✅ Automatic verification
Method 2: Using Source Project Script
cd /home/intlc/projects/smom-dbis-138
forge script script/DeployMockLinkToken.s.sol:DeployMockLinkToken \
--rpc-url http://192.168.11.250:8545 \
--broadcast \
--legacy \
--gas-price 20000000000
Requirements:
- Source project must have all dependencies installed
- May need:
forge installfor dependencies
Method 3: Using deploy-via-rpc-json.sh
Direct JSON-RPC deployment (bypasses forge):
cd /home/intlc/projects/proxmox/explorer-monorepo
./scripts/deploy-via-rpc-json.sh [GAS_PRICE] [GAS_LIMIT]
Example:
./scripts/deploy-via-rpc-json.sh 20000000000 10000000
Deployment Checklist
Before deploying, ensure:
- PRIVATE_KEY is set in .env
- RPC_URL is accessible
- Deployer has sufficient balance (✅ 999M+ ETH)
- Network is operational (✅ Block 175408+)
- Chain ID is correct (✅ 138)
- Foundry is installed
- Deployment script is ready
Note: Previous deployment attempts failed due to network-level restrictions. The DEBUG API should be enabled to get revert reasons if deployment fails again.
Post-Deployment Steps
After successful deployment:
-
Update .env
LINK_TOKEN=<deployed_address> -
Mint Initial Supply (if not done automatically)
cast send $LINK_TOKEN "mint(address,uint256)" \ $DEPLOYER 1000000e18 \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --legacy -
Fund Bridge Contracts
# WETH9 Bridge: 10 LINK cast send $LINK_TOKEN "transfer(address,uint256)" \ $WETH9_BRIDGE 10e18 \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --legacy # WETH10 Bridge: 10 LINK cast send $LINK_TOKEN "transfer(address,uint256)" \ $WETH10_BRIDGE 10e18 \ --rpc-url $RPC_URL \ --private-key $PRIVATE_KEY \ --legacy -
Update Token Lists
- Update
token-lists/lists/dbis-138.tokenlist.json - Update
token-list.json
- Update
-
Run Database Migration
psql -U postgres -d explorer -f backend/database/migrations/0009_add_link_token.up.sql
Troubleshooting
If Deployment Fails
-
Check DEBUG API (if enabled):
curl -X POST -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["<tx_hash>",{"tracer":"callTracer"}],"id":1}' \ http://192.168.11.250:8545 | jq -
Check Transaction Status:
cast receipt <tx_hash> --rpc-url http://192.168.11.250:8545 -
Check Network Logs:
- Besu logs:
journalctl -u besu-rpc -n 100 - Network permissions
- Gas limits
- Besu logs:
Common Issues
- "Intrinsic gas exceeds gas limit": Increase gas limit
- "Transaction reverted": Check DEBUG API for revert reason
- "Contract not found": Wait for confirmation or check transaction status
Next Steps
- ✅ Run deployment test suite
- ⏳ Deploy LINK token contract
- ⏳ Verify deployment
- ⏳ Mint initial supply
- ⏳ Fund bridge contracts
- ⏳ Update configurations
- ⏳ Complete prerequisites
Status: All components verified and ready for deployment.