Fortress
Search…
Get Actions
Gets the actions of a selected proposal. Pass a proposal ID and get the targets, values, signatures and calldatas of that proposal.
1
function getActions(uint proposalId) returns (uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas)
Copied!
  • proposalId: ID of a proposal in which to get its actions.
  • RETURN: Reverts if the proposal ID is invalid. If successful, the following 4 references are returned.

Solidity

1
GovernorAlpha gov = GovernorAlpha(0x123...); // contract address
2
uint proposalId = 123;
3
(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) = gov.getActions(proposalId);
Copied!

Web3 1.2.6

1
const {0: targets, 1: values, 2: signatures, 3: calldatas} = gov.methods.getActions(proposalId).call();
Copied!
Last modified 9mo ago
Copy link