IGovernanceFactory

Git Source

Interface for deploying governance contracts

Functions

deployGovernance

Deploy a governance contract from a template

function deployGovernance(string memory templateName, bytes memory deploymentData)
    external
    returns (address governanceContract);

Parameters

Name
Type
Description

templateName

string

Name of the governance template to deploy

deploymentData

bytes

Encoded deployment configuration

Returns

Name
Type
Description

governanceContract

address

Address of the deployed governance contract

getAvailableTemplates

Get available governance templates

function getAvailableTemplates() external view returns (string[] memory templates);

Returns

Name
Type
Description

templates

string[]

Array of available template names

isTemplateAvailable

Check if a template is available

function isTemplateAvailable(string memory templateName) external view returns (bool available);

Parameters

Name
Type
Description

templateName

string

Name of the template

Returns

Name
Type
Description

available

bool

True if template exists and is deployable

getDeploymentCost

Get deployment cost for a template

function getDeploymentCost(string memory templateName) external view returns (uint256 cost);

Parameters

Name
Type
Description

templateName

string

Name of the template

Returns

Name
Type
Description

cost

uint256

Deployment cost in wei

Last updated

Was this helpful?