Annex Docs
Search…
Execute
After the Timelock delay period, any account may invoke the execute method to apply the changes from the proposal to the target contracts. This will invoke each of the actions described in the proposal.
This function is payable so the Timelock contract can invoke payable functions that were selected in the proposal. E.g., A proposal can add reserves to a market like aBNB, set a aToken's interest rate model, or set risk parameters on the Comptroller.
Governor Alpha
1
function execute(uint proposalId) payable returns (uint)
Copied!
  • proposalId: ID of a succeeded proposal to execute.
  • RETURN: No return, reverts on error.
Solidity
1
GovernorAlpha gov = GovernorAlpha(0x123...); // contract address
2
gov.execute(proposalId).value(999).gas(999)();
Copied!
Web3 1.2.6
1
const tx = gov.methods.execute(proposalId).send({ from: sender, value: 1 });
Copied!
Last modified 4mo ago
Copy link