Bug Bounty Simulations
A. Creating a Bounty
Scenario 1: Using Otacon Tokens
async function createBountyWithOtacon() {
const otaconToken = new ethers.Contract(otaconTokenAddress, erc20ABI, signer);
await otaconToken.approve(registryAddress, otaconFee);
const bountyParams = {
targetContract: '0xTargetContractAddress',
rewards: [1000, 2000, 3000, 4000].map(ethers.utils.parseUnits),
rewardToken: '0xRewardTokenAddress',
requireSnippet: true,
targetNetwork: ethers.utils.formatBytes32String('Ethereum'),
targetEnvironment: ethers.utils.formatBytes32String('Mainnet'),
validators: [],
};
const tx = await otaconRegistry.startBounty(bountyParams, true, false, 0);
await tx.wait();
console.log('Bounty created using Otacon tokens.');
}Scenario 2: Using ETH
Scenario 3: Using Bounty Pass Collectible
B. Staking a Collectible
C. Validating a Proof of Bug
D. Distributing Rewards to a Bounty Hunter
E. Claiming a Bounty Share
Last updated