Smart Contract Generator
Smart Contract Generator
Key Facts
Parameters
Parameter
Type
Required
Description
Quick Start -- JavaScript
npm install @chaingpt/smartcontractgeneratorimport { SmartContractGenerator } from "@chaingpt/smartcontractgenerator";
const client = new SmartContractGenerator({
apiKey: process.env.CHAINGPT_API_KEY,
});
const response = await client.createChatMessage({
model: "smart_contract_generator",
question:
"Create an ERC-721 NFT contract with a max supply of 10,000, " +
"0.05 ETH mint price, and an owner-only withdraw function. " +
"Include a merkle proof whitelist for presale.",
chatHistory: "off",
});
console.log(response.data.bot);Iterative Refinement with Chat History
Tips
Last updated
Was this helpful?