Interact with 0G Chain Contracts
Enables interaction with 0G Chain smart contracts using ethers.js, covering reading, writing, event listening, and gas estimation.
Install this skill
Security score
The Interact with 0G Chain Contracts skill was audited on Feb 25, 2026 and we found 18 security issues across 2 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 124 | console.log(`Transfer: ${from} → ${to}: ${ethers.formatEther(amount)}`); |
Template literal with variable interpolation in command context
| 130 | console.log(`Found ${events.length} transfer events`); |
Access to .env file
| 20 | - `.env` with `PRIVATE_KEY`, `RPC_URL` |
Access to .env file
| 51 | - Hardcode contract addresses in source (use `.env`) |
Access to .env file
| 68 | const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); |
Access to .env file
| 69 | const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, provider); |
Access to .env file
| 74 | const balance = await contract.balanceOf(process.env.WALLET_ADDRESS!); |
Access to .env file
| 86 | const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); |
Access to .env file
| 87 | const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); |
Access to .env file
| 93 | const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, wallet); |
Access to .env file
| 111 | const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); |
Access to .env file
| 116 | const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, provider); |
Access to .env file
| 138 | const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); |
Access to .env file
| 139 | const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); |
Access to .env file
| 142 | const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, wallet); |
Access to .env file
| 165 | const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); |
Access to .env file
| 166 | const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider); |
Access to .env file
| 167 | const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, artifact.abi, wallet); |
Install this skill with one command
/learn @0gfoundation/interact-contract