Vote Proposal

If passed, this Proposal allows a Delegation to vote on a Proposal of the Organization to which it is linked with the Organization's tokens that are present in the Delegation's general (i.e non-Organization specific) TreasuryManager, received from Delegation users when they were wrapped.

This Proposal can be used to vote for both a Root and Governance (subDAO) Proposal.

The Proposal can be initialized with the data parameter executed by the lazyInit function:

function lazyInit(bytes memory lazyInitData) external returns(bytes memory lazyInitResponseData) {
    require(keccak256(bytes(uri)) == keccak256(""));
    (uri, lazyInitResponseData) = abi.decode(lazyInitData, (string, bytes));
    require(keccak256(bytes(uri)) != keccak256(""));

    _lazyInit1(lazyInitResponseData);

    lazyInitResponseData = DelegationUtilities.extractVotingTokens(address(IOrganization(ILazyInitCapableElement(proposalsManagerAddress).host()).delegationsManager()), delegationAddress);
}

function _lazyInit1(bytes memory lazyInitResponseData) private {
    (delegationAddress, proposalsManagerAddress, organizationProposalID, collectionAddress, lazyInitResponseData) = abi.decode(lazyInitResponseData, (address, address, bytes32, address, bytes));
    _lazyInit2(lazyInitResponseData);
}

function _lazyInit2(bytes memory lazyInitResponseData) private {
    (objectId, accept, refuse, vote, afterTermination, additionalUri) = abi.decode(lazyInitResponseData, (uint256, uint256, uint256, bool, bool, string));
}

The lazyInit function contains the following data:

  • uri -> this can contain Proposal Metadata such as title, useful links, etc...

and then:

  • delegationAddress -> this is the address of the Delegation that is voting on / withdrawing votes from the Organization's Proposal.

  • proposalManagerAddress -> this is the address of the Organization's ProposalManager.

  • organizationProposalID -> this is the id of the Proposal to vote/withdraw from.

  • collectionAddresses -> these are the addresses of the Collections of the ERC1155 and Item tokens that can vote on the Proposal. Pass as empty for ERC20 tokens.

  • objectIds -> these are the objectIds of the tokens that can be used to vote on / be withdrawn from the Proposal. The ids of Items and ERC1155s should correspond to the position of their collections in the collectionAddresses parameter. For an ERC20, its address must first be converted in a uint parameter and then passed in this objectIds parameter, while the corresponding collectionAddress must be passed as empty.

  • accepts -> this is the number of accept votes.

  • refuses -> this is the number of refuse votes.

  • vote -> this is a boolean value that must be passed as true to vote on the Proposal or false to withdraw cast votes.

  • afterTermination -> it represents if the Proposal from which the Delegation is withdrawing votes is terminated, i.e. can no longer be voted (true) or not (false).

  • additionalUri -> this can contain Proposal description, risks, benefits, and other information to describe the proposal behavior.

These parameters are defined by the proposer of the Delegation Proposal.

The execute function has the Delegation perform the desired behavior, i.e. vote on the Organization's Proposal or withdraw votes from the Proposal.

function execute(bytes32) external {
    IOrganization organization = IOrganization(ILazyInitCapableElement(msg.sender).host());
    ITreasuryManager treasuryManager = organization.treasuryManager();
    return vote ? _vote(organization, treasuryManager) : _withdraw(organization, treasuryManager);
}

Voting On This Proposal

This Proposal can be voted on using the wrapped governance tokens of the Organization to which the Delegation's TreasuryManager is linked (recall that a Delegation has a different dedicated TreasuryManager for each Organization to which it is attached).

The Delegation token is automatically retrieved by the Proposal using the extractVotingTokens function:

DelegationUtilities.extractVotingTokens(address(IOrganization(ILazyInitCapableElement(proposalsManagerAddress).host()).delegationsManager()), delegationAddress);

This Proposal follows the governance rules set by the Delegation host at the time of Delegation creation or changed through the "Change Rules Proposal".

Last updated