Deploy your own frontend and earn 5% of all mining fees
Every mining transaction through your Donut Shop earns you 5% in ETH. Build once, earn forever.
Build your own interface for DONUT mining
Include your builder address in the contract calls
Market your shop and attract miners
Automatically receive 5% of all purchases
// Example: Mining with your builder code
const mine = async (minerAddress, builderAddress) => {
const miner = new ethers.Contract(
MINER_ADDRESS,
MINER_ABI,
signer
);
const epochId = await miner.getSlot0().epochId;
const currentPrice = await miner.getPrice();
const deadline = Math.floor(Date.now() / 1000) + 300;
const tx = await miner.mine(
minerAddress, // Who becomes King Glazer
builderAddress, // Your builder code address (5% fee)
epochId, // Current epoch
deadline, // Transaction deadline
currentPrice, // Max price willing to pay
"Your Shop Name", // Optional URI/metadata
{ value: currentPrice }
);
await tx.wait();
};Important: Pass your wallet address as the provider parameter to earn 5% of the purchase price. If you pass address(0), the 5% goes to the treasury instead.