Complete API documentation for BlockRaise smart contracts. Interact directly with the blockchain for advanced integrations and custom applications.
import { ethers } from 'ethers';
const factoryAddress = '0x1D86a62C58650C58ffb4262FA01a919E46176C89';
const factoryABI = [...]; // Factory contract ABI
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
const factoryContract = new ethers.Contract(
factoryAddress,
factoryABI,
signer
);const tx = await factoryContract.createCampaign(
"My Project",
"Building something amazing",
ethers.utils.parseUnits("1000", 8), // $1000
30 // 30 days
);
await tx.wait();
console.log("Campaign created!");const campaignAddress = '0x...'; // From createCampaign event
const campaignABI = [...]; // Campaign contract ABI
const campaignContract = new ethers.Contract(
campaignAddress,
campaignABI,
signer
);
// Contribute to tier 0 with 0.1 ETH
const tx = await campaignContract.fund(0, {
value: ethers.utils.parseEther("0.1")
});
await tx.wait();Emitted when a new campaign is created through the factory.
Contracts are deployed on Ethereum Sepolia testnet. Use the provided addresses and ABIs for your integrations.