Skip to main content

VotiumBriber

Functions

constructor

function constructor(
address _core,
contract IERC20 _token,
contract IVotiumBribe _votiumBribe
) public

VotiumBriber constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_tokencontract IERC20The token spent for bribes
_votiumBribecontract IVotiumBribeThe Votium bribe contract

bribe

function bribe(
bytes32 _proposal,
uint256 _choiceIndex
) public

Spend tokens on Votium to bribe for a given pool.

the call will revert if Votium has not called initiateProposal with the _proposal ID, if _choiceIndex is out of range, or of block.timestamp is after the deadline for bribing (usually 6 hours before Convex snapshot vote ends).

Parameters

NameTypeDescription
_proposalbytes32id of the proposal on snapshot
_choiceIndexuint256index of the pool in the snapshot vote to vote for

withdrawERC20

function withdrawERC20(
address token,
address to,
uint256 amount
) external

withdraw ERC20 from the contract

Parameters

NameTypeDescription
tokenaddressaddress of the ERC20 to send
toaddressaddress destination of the ERC20
amountuint256quantity of ERC20 to send