HausDAO / daohaus-monorepo-deprecated

MIT License
13 stars 5 forks source link

Further Decode Action Data on GovernanceConfig Proposals #942

Closed earth2travis closed 2 years ago

earth2travis commented 2 years ago

Details

When decoding action data for governance setting update proposals we need to do a 2nd round of decoding so we can display the args in the governance config.

These are encoded in when creating the proposal.

Example: https://admin.daohaus.fun/#/molochV3/0x5/0x5e0158adb4d5ccf34736aa5e3d25b23ce41c131d/proposals/38

Image

Contract reference: https://github.com/HausDAO/Baal/blob/feat/baalZodiac/contracts/Baal.sol#L844

    function setGovernanceConfig(bytes memory _governanceConfig)
        external
        baalOrGovernorOnly
    {
        (
            uint32 voting,
            uint32 grace,
            uint256 newOffering,
            uint256 quorum,
            uint256 sponsor,
            uint256 minRetention
        ) = abi.decode(
                _governanceConfig,
                (uint32, uint32, uint256, uint256, uint256, uint256)
            );
santteegt commented 2 years ago

@earth2travis this is how it looks now:

image
earth2travis commented 2 years ago

@santteegt this is looking good

@skuhlmann what do you think?