GovernanceFactoryStorage

Git Source

Storage library for governance factory specific data

Uses diamond storage pattern for upgradeable contracts

State Variables

STORAGE_SLOT

bytes32 internal constant STORAGE_SLOT = keccak256("capsign.storage.governance_factory");

Functions

layout

function layout() internal pure returns (Layout storage l);

setFeeRecipient

function setFeeRecipient(address feeRecipient) internal;

getFeeRecipient

function getFeeRecipient() internal view returns (address);

incrementGovernanceCount

function incrementGovernanceCount(address user, string memory governanceType) internal;

decrementGovernanceCount

function decrementGovernanceCount(address user, string memory governanceType) internal;

getGovernanceCount

function getGovernanceCount(address user, string memory governanceType) internal view returns (uint256);

getTotalGovernanceCount

function getTotalGovernanceCount(address user) internal view returns (uint256);

registerGovernance

function registerGovernance(address governanceInstance, string memory governanceType, address owner) internal;

unregisterGovernance

function unregisterGovernance(address governanceInstance) internal;

isGovernance

function isGovernance(address governanceInstance) internal view returns (bool);

getGovernanceType

function getGovernanceType(address governanceInstance) internal view returns (string memory);

getGovernanceOwner

function getGovernanceOwner(address governanceInstance) internal view returns (address);

Structs

Layout

struct Layout {
    address feeRecipient;
    mapping(address => mapping(string => uint256)) userGovernanceCount;
    mapping(address => uint256) totalGovernanceCount;
    mapping(address => bool) isGovernanceInstance;
    mapping(address => string) governanceType;
    mapping(address => address) governanceOwner;
    mapping(string => bytes) governanceBytecode;
    address[] allGovernances;
    uint256 deploymentCount;
    uint256[40] __gap;
}

Last updated

Was this helpful?