Skip to main content

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

or
66/100

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

medium line 124

Template literal with variable interpolation in command context

SourceSKILL.md
124console.log(`Transfer: ${from} → ${to}: ${ethers.formatEther(amount)}`);
medium line 130

Template literal with variable interpolation in command context

SourceSKILL.md
130console.log(`Found ${events.length} transfer events`);
medium line 20

Access to .env file

SourceSKILL.md
20- `.env` with `PRIVATE_KEY`, `RPC_URL`
medium line 51

Access to .env file

SourceSKILL.md
51- Hardcode contract addresses in source (use `.env`)
low line 68

Access to .env file

SourceSKILL.md
68const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
low line 69

Access to .env file

SourceSKILL.md
69const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, provider);
low line 74

Access to .env file

SourceSKILL.md
74const balance = await contract.balanceOf(process.env.WALLET_ADDRESS!);
low line 86

Access to .env file

SourceSKILL.md
86const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
low line 87

Access to .env file

SourceSKILL.md
87const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
low line 93

Access to .env file

SourceSKILL.md
93const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, wallet);
low line 111

Access to .env file

SourceSKILL.md
111const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
low line 116

Access to .env file

SourceSKILL.md
116const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, provider);
low line 138

Access to .env file

SourceSKILL.md
138const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
low line 139

Access to .env file

SourceSKILL.md
139const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
low line 142

Access to .env file

SourceSKILL.md
142const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, ABI, wallet);
low line 165

Access to .env file

SourceSKILL.md
165const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
low line 166

Access to .env file

SourceSKILL.md
166const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
low line 167

Access to .env file

SourceSKILL.md
167const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS!, artifact.abi, wallet);
Scanned on Feb 25, 2026
View Security Dashboard