Voting
Voting
// you vote with vevc token which is ERC20 not ERC721
Token[] memory tokens = new Token[](1);
tokens[0] = toToken(IERC20(vevc));
operation[] memory ops = new operation[](1);
// Vote interacts with gauge. Gauge is same with pool for volatile pairs.
// Check Stake section of the docs to find out way to get stablepool's gauge address.
int128 voteAmount = int128(int256(IERC20(vevc).balanceOf(address(this))));
ops[0].poolId = toPoolId(VOTE,usdc_eth_pool);
ops[0].tokenInformations = new bytes32[](1);
//Vote : positive flow in gauge's perspective. Unvote : negative flow. so just put - in the amount to unvote.
ops[0].tokenInformations[0] = toTokenInfo(0x00,EXACTLY,voteAmount);
ops[0].data = "";
return execute(tokens, new int128[](1), ops);Last updated