Purpose
What VLVoting is for.
Member staking, proposals, voting, execution, and withdrawal queues.
Only voting members can propose and vote. The contract itself authorizes governance-controlled protocol operations.
Stake → governance
Member staking, proposals, voting, execution, and withdrawal queues.
Purpose
Member staking, proposals, voting, execution, and withdrawal queues.
Only voting members can propose and vote. The contract itself authorizes governance-controlled protocol operations.
Basic workflow
Methods
These are the public and external methods declared directly by VLVoting. Inherited token, ownership, and upgrade methods follow their respective standards.
initialize(address vow_, uint256 minimumStake_, uint64 votingPeriod_, uint64 withdrawalDelay_, uint16 quorumBps_, uint16 supermajorityBps_)TransactionInitializes the deployed contract and its required dependencies.
registryName() returns (string memory)ReadReturns the human-readable name used for contract registration.
stake(uint256 amount)TransactionExecutes the stake operation.
proposeMember(address candidate) returns (uint256)TransactionExecutes the propose member operation.
proposeRemoval(address member) returns (uint256)TransactionExecutes the propose removal operation.
proposeCall(address target, uint256 value, bytes calldata callData) returns (uint256)TransactionExecutes the propose call operation.
vote(uint256 proposalId, bool support)TransactionExecutes the vote operation.
execute(uint256 proposalId) returns (bytes memory result)TransactionExecutes the execute operation.
queueWithdrawal(uint256 amount)TransactionExecutes the queue withdrawal operation.
withdraw()TransactionExecutes the withdraw operation.
getProposal(uint256 proposalId) returns (Proposal memory)ReadReads the requested contract state or calculated result without changing state.
votingWeightAt(address voter, uint32 blockNumber) returns (uint256)ReadExecutes the voting weight at operation.
Node.js
import { Contract, JsonRpcProvider, Wallet, encodeBytes32String, parseUnits } from "ethers";
const provider = new JsonRpcProvider(process.env.RPC_URL);
const signer = new Wallet(process.env.SIGNER_PRIVATE_KEY, provider);
const at = (address, abi, writable = false) =>
new Contract(address, abi, writable ? signer : provider);
const voting = at(VOTING, ["function vote(uint256,bool)", "function getProposal(uint256) view returns (tuple)"] , true);
await (await voting.vote(proposalId, true)).wait();Deployment
Read the deployment manifest or resolve the configured registry entry for the target network. Test on a local or test network before using a privileged signer. See the contract source and contract index for the full interface.