Contract Specification
Constant
- contract Constant
- CURRENT_VERSION()
software versions
- MAXIMUM_REBATE_BASE_FEE()
the maximum allowed gas fee for rebate
- MAXIMUM_REBATE_GAS_USED()
The maximum refundable gas used
- MAXIMUM_REBATE_PRIORITY_FEE()
The maximum priority fee
- MAXIMUM_VOTE_DELAY()
maximum vote delay
- MAXIMUM_VOTE_DURATION()
maximum vote duration
- MINIMUM_PROJECT_QUORUM()
minimum quorum
- MINIMUM_VOTE_DELAY()
minimum vote delay
- MINIMUM_VOTE_DURATION()
minimum vote duration
- REBATE_BASE_GAS()
The vote rebate gas overhead, including 7K for ETH transfer and 29K for general transaction overhead
- STRING_DATA_LIMIT()
limit for string information in meta data
- TIMELOCK_GRACE_PERIOD()
maximum time allowed after the nonce to successfully execute the time lock
- TIMELOCK_MAXIMUM_DELAY()
the maximum lock period
- TIMELOCK_MINIMUM_DELAY()
the minimum lock period
- createAddressSet()
- Returns:
AddressSet the created set
create an AddressSet
- createChoiceSet()
- Returns:
ChoiceSet the created set
create an ChoiceSet
- createMetaSet()
- Returns:
MetaSet the created set
create an MetaSet
- createTransactionSet()
- Returns:
TransactionSet the created set
create an TransactionSet
- empty(string)
- Returns:
bool True if empty string
- from(AddressCollection)
create address set from provided collection
- from(address[])
create from array
- len(string)
- Notice:
This method is expensive and is used only for validating inputs on the creation of new Governance contract or upon the configuration of a new vote
Compute the length of any string in solidity
ProposalBuilder
- contract ProposalBuilder
- aProposal()
- Returns:
Builder - this contract
reset the proposal builder for this address
- build()
- Returns:
uint256 the propposal id
build the proposal
- initialize(address,address,address)
- Parameters:
_governanceAddress – address of CollectiveGovernance
_metaAddress – address of meta storage
_storageAddress – address of Storage contract
System factory
- name()
- Returns:
string memory representation of name
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(address,address,address,uint8)
- Parameters:
_governanceAddress – address of CollectiveGovernance
_metaAddress – address of meta storage
_storageAddress – address of Storage contract
_version – upgrade version
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- withChoice(bytes32, string, uint256)
- Parameters:
_description – The description of this choice
_name – The name for this choice
_transactionId – The associated transactionId
Attach a choice for a choice vote on this proposal
- withDelay(uint256)
- Parameters:
_delay – the delay
- Returns:
ProposalBuilder this builder
set the vote delay
- withDescription(string,string)
- Parameters:
_description – the description
_url – the url
- Returns:
ProposalBuilder this builder
set the description
- withDuration(uint256)
- Parameters:
_duration – the duration
- Returns:
ProposalBuilder this builder
set the vote duration
- withMeta(bytes32, string)
- Parameters:
_name – the name of the metadata field
_value – the value of the metadata
- Returns:
ProposalBuilder this builder
attach arbitrary metadata to the proposal
- withQuorum(uint256)
- Parameters:
_quorum – the quorum
- Returns:
ProposalBuilder this builder
set the minimum quorum
- withTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected call time, within the timelock grace, for the transaction
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
ProposalBuilder this builder
Attach a transaction to the proposal.
ProposalBuilderProxy
- contract ProposalBuilderProxy
- constructor()
- Parameters:
_governanceAddress – the Governance contract
_implementation – the address of the implementation contract
_metaAddress – the MetaStorage contract
_storageAddress – the Storage contract
create a proposal builder proxy
- upgrade(address,address,address,address,uint8)
- Parameters:
_governanceAddress – the Governance contract
_implementation – the address of the implementation contract
_metaAddress – the MetaStorage contract
_storageAddress – the Storage contract
_version – the implementation contract version
System
- contract System
- constructor()
- Parameters:
_creatorAddress – address of GovernanceBuilder
_voterCreator – address of VoterClassCreator
System factory
- create(bytes32,string,string,address,uint256)
- Parameters:
_description – the project description
_erc721 – address of ERC-721 contract
_name – the project name
_quorumRequirement – required quorum for community
_url – the project url
- Notice:
this is useful for front end code or minimizing transactions
one-shot factory creation method for Collective Governance System
- create(bytes32,string,string,address,uint256,uint256,bool)
- Parameters:
_description – the project description
_erc721 – address of ERC-721 contract
_isClosed – True if closed to non voters
_name – the project name
_quorumRequirement – required quorum for community
_tokenRequirement – The number of token required for a proposal
_url – the project url
- Notice:
this is useful for front end code or minimizing transactions
one-shot factory creation method for Collective Governance System
- name()
- Returns:
string memory representation of name
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
- upgrade(address,address)
- Parameters:
_creatorAddress – address of GovernanceBuilder
_voterCreator – address of VoterClassCreator
- Notice:
onlyOwner
System factory upgrade
- version()
- Returns:
uint32 the version number
return the version number of this contract
AlwaysFinal
ConfigurableMutable
Mutable
- interface Mutable
- isFinal()
- Returns:
bool True if this object is final
OwnableInitializable
- contract OwnableInitializable
Versioned
- interface Versioned
VersionedContract
- contract VersionedContract
- version()
- Returns:
uint32 the version number
return the version number of this contract
AddressCollection
- contract AddressCollection
AddressSet
- contract AddressSet
- add(address)
- Parameters:
_element – the address
- Returns:
uint256 the elementId of the transaction
add an element
- contains(address)
- Parameters:
_element – The element to test
- Returns:
bool True if address is contained
- erase(address)
- Parameters:
_element – The address to erase
- Returns:
bool True if element was removed
- Notice:
swaps element to end and deletes the end
erase an element
- erase(uint256)
- Parameters:
_index – The address to erase
- Returns:
bool True if element was removed
- Notice:
swaps element to end and deletes the end
erase an element
- find(address)
- Parameters:
_element – The element to find
- Returns:
uint256 The index associated with element
- get(uint256)
- Parameters:
index – The index to return
- Returns:
address The requested address
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- set(address)
- Parameters:
_element – the address
- Returns:
bool true if added false otherwise
set value
- size()
- Returns:
uint256 The size of the set
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
ChoiceCollection
- contract ChoiceCollection
ChoiceSet
- contract ChoiceSet
- add((bytes32, string, uint256, bytes32, uint256))
- Parameters:
_element – the choice
- Returns:
uint256 the elementId of the choice
add choice
- contains((bytes32, string, uint256, bytes32, uint256))
- Parameters:
_choice – The element to test
- Returns:
bool True if address is contained
- contains(uint256)
- Parameters:
_choiceId – The element to test
- Returns:
bool True if address is contained
- erase(uint256)
- Parameters:
_index – the index to remove
- Returns:
bool True if element was removed
erase a choice
- find((bytes32, string, uint256, bytes32, uint256))
- Parameters:
_choice – The element to find
- Returns:
uint256 The index associated with element
- get(uint256)
- Parameters:
index – The index to return
- Returns:
address The requested address
- incrementVoteCount(uint256)
- Parameters:
index – The index to increment
- Returns:
uint256 The updated count
increment the votecount choice parameter
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- size()
- Returns:
uint256 The size of the set
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
MetaCollection
- contract MetaCollection
MetaSet
- contract MetaSet
- add((bytes32, string))
- Parameters:
_element – the meta
- Returns:
uint256 the elementId of the meta
add meta
- contains((bytes32, string))
- Parameters:
_meta – The element to test
- Returns:
bool True if address is contained
- erase(uint256)
- Parameters:
_index – the index to remove
- Returns:
bool True if element was removed
erase a meta
- find((bytes32, string))
- Parameters:
_meta – The element to find
- Returns:
uint256 The index associated with element
- get(uint256)
- Parameters:
index – The index to return
- Returns:
address The requested address
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- size()
- Returns:
uint256 The size of the set
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
TransactionCollection
- contract TransactionCollection
TransactionSet
- contract TransactionSet
- add((address, uint256, string, bytes, uint256))
- Parameters:
_element – the transaction
- Returns:
uint256 the elementId of the transaction
add transaction
- contains((address, uint256, string, bytes, uint256))
- Parameters:
_transaction – The element to test
- Returns:
bool True if address is contained
- erase(uint256)
- Parameters:
_index – the index to remove
- Returns:
bool True if element was removed
erase a transaction
- find((address, uint256, string, bytes, uint256))
- Parameters:
_transaction – The element to find
- Returns:
uint256 The index associated with element
- get(uint256)
- Parameters:
index – The index to return
- Returns:
address The requested address
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- size()
- Returns:
uint256 The size of the set
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
CommunityBuilder
- contract CommunityBuilder
- aCommunity()
- Returns:
CommunityBuilder - this contract
reset the community class builder for this address
- asClosedErc20Community(address, uint256)
- Parameters:
project – the token contract address
tokenThreshold – the number of tokens required to propose
- Returns:
CommunityBuilder - this contract
- Notice:
community is closed to external proposals
build Closed ERC-20 community
- asClosedErc721Community(address, uint256)
- Parameters:
project – the token contract address
tokenThreshold – the number of tokens required to propose
- Returns:
CommunityBuilder - this contract
- Notice:
community is closed to external proposals
build Closed ERC-721 community
- asErc20Community(address)
- Parameters:
project – the token contract address
- Returns:
CommunityBuilder - this contract
build ERC-20 community
- asErc721Community(address)
- Parameters:
project – the token contract address
- Returns:
CommunityBuilder - this contract
build ERC-721 community
- asOpenCommunity()
- Returns:
CommunityBuilder - this contract
build an open community
- asPoolCommunity()
- Returns:
CommunityBuilder - this contract
build a pool community
- build()
- Returns:
address - The address of the newly created contract
Build the contract with the configured settings.
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- reset()
remove storage used by builder
- supportsInterface(bytes4)
see ERC-165
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- withCommunitySupervisor(address)
- Parameters:
_supervisor – the supervisor address
- Returns:
CommunityBuilder - this contract
add community supervisor
- withMaximumBaseFeeRebate(uint256)
- Parameters:
_baseFeeRebate – the base fee rebate
- Returns:
CommunityBuilder - this contract
set the maximum base fee rebate
- withMaximumGasUsedRebate(uint256)
- Parameters:
_gasRebate – the gas used rebate
- Returns:
CommunityBuilder - this contract
set the maximum gas used rebate
- withMaximumVoteDelay(uint256)
- Parameters:
_delay –
maximum vote delay in Ethereum (epoch) seconds
- Returns:
CommunityBuilder - this contract
set the maximum vote delay for the community
- withMaximumVoteDuration(uint256)
- Parameters:
_duration –
maximum vote duration in Ethereum (epoch) seconds
- Returns:
CommunityBuilder - this contract
set the maximum vote duration for the community
- withMinimumVoteDelay(uint256)
- Parameters:
_delay –
minimum vote delay in Ethereum (epoch) seconds
- Returns:
CommunityBuilder - this contract
set the minimum vote delay for the community
- withMinimumVoteDuration(uint256)
- Parameters:
_duration –
minimum vote duration in Ethereum (epoch) seconds
- Returns:
CommunityBuilder - this contract
set the minimum vote duration for the community
- withQuorum(uint256)
- Parameters:
_quorum – the minimum quorum
- Returns:
CommunityBuilder - this contract
set the minimum quorum for this community
- withVoter(address)
- Parameters:
voter – the wallet address
- Returns:
CommunityBuilder - this contract
append a voter for a pool community
- withWeight(uint256)
- Parameters:
_weight – the voting weight
- Returns:
CommunityBuilder - this contract
set the voting weight for each authorized voter
CommunityBuilderProxy
- contract CommunityBuilderProxy
CommunityClass
- interface CommunityClass
- canPropose(address)
- Parameters:
_sender – The address of the sender
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
discover an array of shareIds associated with the specified wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet is a voter
test if wallet represents an allowed voter for this class
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint256 the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration maximum in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint256 the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration minimum in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
ProjectCommunityClass
- contract ProjectCommunityClass
- canPropose(address)
- Parameters:
_sender – The address of the sender
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
discover an array of shareIds associated with the specified wallet
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – the token project contract address
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a vote
create a new community class representing community preferences
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a vote
create a new community class representing community preferences
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet is a voter
test if wallet represents an allowed voter for this class
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint256 the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration maximum in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint256 the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration minimum in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a vote
version – upgrade version
reset voting parameters for upgrade
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
WeightedCommunityClass
- contract WeightedCommunityClass
- canPropose(address)
- Parameters:
_sender – The address of the sender
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
discover an array of shareIds associated with the specified wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a vote
create a new community class representing community preferences
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet is a voter
test if wallet represents an allowed voter for this class
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint256 the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration maximum in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint256 the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration minimum in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a vote
version – upgrade version
reset voting parameters for upgrade
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
CommunityClassClosedERC20
- contract CommunityClassClosedERC20
- canPropose(address)
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Parameters:
_shareId – the walletId
_wallet – the wallet holding the tokens
- Returns:
uint256 The number of weighted votes confirmed
- Notice:
does not require IERC721Enumerable, tokenId ownership is checked directly using ERC-721
confirm tokenId is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of number of votes available
discover the number of tokens available to vote
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_requirement – The token requirement
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet can sign for votes on this class
determine if wallet holds at least one token from the ERC-721 contract
- makeFinal()
- Notice:
always reverts
set the control object to final.
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- votesAvailable(address)
- Parameters:
_wallet – The wallet to test for ownership
tabulate the number of votes available for the specified wallet
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
CommunityClassClosedERC721
- contract CommunityClassClosedERC721
- canPropose(address)
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Parameters:
_tokenId – the id of the token
_wallet – the wallet holding the token
- Returns:
uint256 The number of weighted votes confirmed
- Notice:
does not require IERC721Enumerable, tokenId ownership is checked directly using ERC-721
confirm tokenId is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
- Notice:
discovery requires support for ERC721Enumerable, otherwise execution will revert
discover an array of tokenIds associated with the specified wallet
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_requirement – The token requirement
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet can sign for votes on this class
determine if wallet holds at least one token from the ERC-721 contract
- makeFinal()
- Notice:
always reverts
set the control object to final.
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- votesAvailable(address, uint256)
- Parameters:
_tokenId – The id of the token associated with the ERC-721 contract
_wallet – The wallet to test for ownership
tabulate the number of votes available for the specific wallet and tokenId
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
CommunityClassERC20
- contract CommunityClassERC20
- canPropose(address)
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Parameters:
_shareId – the walletId
_wallet – the wallet holding the tokens
- Returns:
uint256 The number of weighted votes confirmed
- Notice:
does not require IERC721Enumerable, tokenId ownership is checked directly using ERC-721
confirm tokenId is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of number of votes available
discover the number of tokens available to vote
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet can sign for votes on this class
determine if wallet holds at least one token from the ERC-721 contract
- makeFinal()
- Notice:
always reverts
set the control object to final.
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- votesAvailable(address)
- Parameters:
_wallet – The wallet to test for ownership
tabulate the number of votes available for the specified wallet
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
CommunityClassERC721
- contract CommunityClassERC721
- canPropose(address)
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Parameters:
_tokenId – the id of the token
_wallet – the wallet holding the token
- Returns:
uint256 The number of weighted votes confirmed
- Notice:
does not require IERC721Enumerable, tokenId ownership is checked directly using ERC-721
confirm tokenId is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
- Notice:
discovery requires support for ERC721Enumerable, otherwise execution will revert
discover an array of tokenIds associated with the specified wallet
- initialize(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet can sign for votes on this class
determine if wallet holds at least one token from the ERC-721 contract
- makeFinal()
- Notice:
always reverts
set the control object to final.
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- votesAvailable(address, uint256)
- Parameters:
_tokenId – The id of the token associated with the ERC-721 contract
_wallet – The wallet to test for ownership
tabulate the number of votes available for the specific wallet and tokenId
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
CommunityClassOpenVote
- contract CommunityClassOpenVote
- canPropose(address)
- Returns:
bool always true
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
- Notice:
the shareId of the open vote is the numeric value of the wallet address itself
discover an array of shareIds associated with the specified wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if voter
- Notice:
always returns true
return true for all wallets
- makeFinal()
- Notice:
always reverts
set the control object to final.
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
ClosedProjectCommunityClassProxy
- contract ClosedProjectCommunityClassProxy
- constructor()
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a single voting share
create a new community class proxy
- upgrade(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the contract version
_voteWeight – the weight of a single voting share
CommunityClassProxy
- interface CommunityClassProxy
- upgrade(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the version of the implementation contract
_voteWeight – the weight of a single voting share
upgrade the proxy
ProjectCommunityClassProxy
- contract ProjectCommunityClassProxy
- constructor()
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_contract – Address of the token contract
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a single voting share
create a new community class proxy
- upgrade(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the contract version
_voteWeight – the weight of a single voting share
WeightedCommunityClassProxy
- contract WeightedCommunityClassProxy
- constructor()
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a single voting share
create a new community class proxy
- upgrade(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the version of the implementation contract
_voteWeight – the weight of a single voting share
upgrade the proxy
WiredClassProxy
- contract WiredClassProxy
- upgrade(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_implementation – the address of the community class implementation
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the version of the implementation contract
_voteWeight – the weight of a single voting share
upgrade the proxy
CommunityClassVoterPool
- contract CommunityClassVoterPool
- addVoter(address)
- Parameters:
_wallet – the address to add
- Notice:
only possible if not final
add a voter to the voter pool
- canPropose(address)
- Parameters:
_sender – The address of the sender
- Returns:
bool true if this address is approved
- Notice:
listed voter is required for proposal
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
discover an array of shareIds associated with the specified wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – The integral weight to apply to each token held by the wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet is a voter
test if wallet represents an allowed voter for this class
- makeFinal()
set the voterpool final. No further changes may be made to the voting pool.
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- removeVoter(address)
- Parameters:
_wallet – the address to add
- Notice:
only possible if not final
remove a voter from the voter pool
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
VoterPool
ProjectClassFactory
- contract ProjectClassFactory
- createClosedErc721(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_supervisorList – the list of supervisors for this project
maximumVoteDelay – the least possible vote delay
maximumVoteDuration – the least possible voting duration
minimumProjectQuorum – the least possible quorum for any vote
minimumVoteDelay – the least possible vote delay
minimumVoteDuration – the least possible voting duration
projectToken – the token underlier for the community
tokenThreshold – the number of tokens required to propose a vote
weight – the weight of a single voting share
create a new community class representing a closed ERC-721 token based community
- createErc721(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_supervisorList – the list of supervisors for this project
maximumVoteDelay – the least possible vote delay
maximumVoteDuration – the least possible voting duration
minimumProjectQuorum – the least possible quorum for any vote
minimumVoteDelay – the least possible vote delay
minimumVoteDuration – the least possible voting duration
projectToken – the token underlier for the community
weight – the weight of a single voting share
create a new community class representing an ERC-721 token based community
TokenClassFactory
- contract TokenClassFactory
- createClosedErc20(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_supervisorList – the list of supervisors for this project
maximumVoteDelay – the least possible vote delay
maximumVoteDuration – the least possible voting duration
minimumProjectQuorum – the least possible quorum for any vote
minimumVoteDelay – the least possible vote delay
minimumVoteDuration – the least possible voting duration
projectToken – the token underlier for the community
tokenThreshold – the number of tokens required to propose a vote
weight – the weight of a single voting share
create a new community class representing a closed ERC-20 token based community
- createErc20(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_supervisorList – the list of supervisors for this project
maximumVoteDelay – the least possible vote delay
maximumVoteDuration – the least possible voting duration
minimumProjectQuorum – the least possible quorum for any vote
minimumVoteDelay – the least possible vote delay
minimumVoteDuration – the least possible voting duration
projectToken – the token underlier for the community
weight – the weight of a single voting share
create a new community class representing an ERC-20 token based community
WeightedClassFactory
- contract WeightedClassFactory
- createOpenVote(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_supervisorList – the list of supervisors for this project
maximumVoteDelay – the least possible vote delay
maximumVoteDuration – the least possible voting duration
minimumProjectQuorum – the least possible quorum for any vote
minimumVoteDelay – the least possible vote delay
minimumVoteDuration – the least possible voting duration
weight – the weight of a single voting share
create a new community class representing an open vote
- createVoterPool(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_supervisorList – the list of supervisors for this project
maximumVoteDelay – the least possible vote delay
maximumVoteDuration – the least possible voting duration
minimumProjectQuorum – the least possible quorum for any vote
minimumVoteDelay – the least possible vote delay
minimumVoteDuration – the least possible voting duration
weight – the weight of a single voting share
create a new community class representing a voter pool
ScheduledCommunityClass
- contract ScheduledCommunityClass
- canPropose(address)
- Parameters:
_sender – The address of the sender
- Returns:
bool true if this address is approved
determine if adding a proposal is approved for this voter
- communitySupervisorSet()
- Returns:
AddressSet the supervisor set
return the community supervisors
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
discover an array of shareIds associated with the specified wallet
- initialize(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_voteWeight – the weight of a vote
create a new community class representing community preferences
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet is a voter
test if wallet represents an allowed voter for this class
- maximumBaseFeeRebate()
- Returns:
uint256 the base fee rebate
maximum base fee rebate
- maximumGasUsedRebate()
- Returns:
uint256 the maximum rebate
maximum gas used rebate
- maximumVoteDelay()
- Returns:
uint the max vote delay allowed for any vote
get the project vote delay maximum
- maximumVoteDuration()
- Returns:
uint256 the vote duration of a vote in seconds
get the vote duration in seconds
- minimumProjectQuorum()
- Returns:
uint256 the least quorum allowed for any vote
get the project quorum requirement
- minimumVoteDelay()
- Returns:
uint the least vote delay allowed for any vote
get the project vote delay requirement
- minimumVoteDuration()
- Returns:
uint256 the least duration of a vote in seconds
get the vote duration in seconds
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgrade(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint8)
- Parameters:
_baseFeeRebate – The maximum base fee rebate
_gasUsedRebate – The maximum rebate for gas used
_maximumDelay – the least possible vote delay
_maximumDuration – the least possible voting duration
_minimumDelay – the least possible vote delay
_minimumDuration – the least possible voting duration
_minimumQuorum – the least possible quorum for any vote
_supervisorList – the list of supervisors for this project
_version – the upgraded version
_voteWeight – the weight of a single voting share
reset voting parameters for upgrade
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- weight()
- Returns:
uint256 weight applied to one share
return voting weight of each confirmed share
VoterClass
- interface VoterClass
- confirm(address, uint256)
- Returns:
uint256 The number of weighted votes confirmed
confirm shareid is associated with wallet for voting
- discover(address)
- Returns:
uint256[] array in memory of share ids
discover an array of shareIds associated with the specified wallet
- isFinal()
- Returns:
bool True if this object is final
- isVoter(address)
- Returns:
bool true if wallet is a voter
test if wallet represents an allowed voter for this class
- name()
- Returns:
string memory representation of name
return the name of this implementation
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
CollectiveGovernance
- contract CollectiveGovernance
- abstainFrom(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
auto discovery is attempted and if possible the method will proceed using the discovered shares
abstain from vote by id
- abstainFrom(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
abstain from vote by id
- abstainFrom(uint256, uint256[])
- Parameters:
_proposalId – The numeric id of the proposed vote
_shareList – A array of tokens or shares that confer the right to vote
abstain from vote by id
- addChoice(uint256,bytes32,string,uint256)
- Parameters:
_description – the detailed description of the choice
_name – the name of the metadata field
_proposalId – the id of the proposal
_transactionId – The id of the transaction to execute
- Notice:
requires supervisor
set a choice by choice id
- attachTransaction(uint256,address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_proposalId – the id of the proposal
_scheduleTime – the expected call time, within the timelock grace, for the transaction
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
uint256 the transactionId
- Notice:
required prior to calling configure
Attach a transaction to the specified proposal. If successfull, it will be executed when voting is ended.
- cancel(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
proposal must be finalized and ready but voting must not yet be open
cancel a proposal if it is not yet open
- cancelRebate(address)
- Parameters:
_recipient – The address to cancel the rebate for
cancel rebate for recipient
- configure(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_quorumRequired – The threshold of participation that is required for a successful conclusion of voting
configure an existing proposal by id
- configure(uint256,uint256,uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_quorumRequired – The threshold of participation that is required for a successful conclusion of voting
_requiredDelay – The minimum time required before the start of voting
_requiredDuration – The minimum time for voting to proceed before ending the vote is allowed
configure an existing proposal by id
- constructor()
- Parameters:
_class – the VoterClass for this project
_governanceStorage – The storage contract for this governance
- Notice:
This should be invoked through the GovernanceBuilder. Gas Rebate is contingent on contract being funded through a transfer.
create a new collective governance contract
- endVote(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
it is not possible to end voting until the required duration has elapsed
end voting on an existing proposal by id
- getVoteSucceeded(uint256)
- Returns:
bool True if the vote is closed and passed
- Notice:
This method will fail if the vote was vetoed
get the result of the vote
- isOpen(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Returns:
bool True if the proposal is open
test if an existing proposal is open
- name()
- Returns:
string memory representation of name
return the name of this implementation
- propose()
- Returns:
uint256 The id of the new proposal
- Notice:
Only one new proposal is allowed per msg.sender
propose a vote for the community
- rebateBalance()
return the rebate funds available
- startVote(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
start the voting process by proposal id
- supportsInterface(bytes4)
see ERC-165
- version()
- Returns:
uint32 the version number
return the version number of this contract
- veto(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
transaction must be signed by a supervisor wallet
veto proposal by id
- voteAgainst(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
auto discovery is attempted and if possible the method will proceed using the discovered shares
cast an against vote by id
- voteAgainst(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
cast an against vote by id
- voteAgainst(uint256, uint256[])
- Parameters:
_proposalId – The numeric id of the proposed vote
_shareList – A array of tokens or shares that confer the right to vote
cast an against vote by id
- voteChoice(uint256,uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – The numeric id of the proposed vote
cast an affirmative vote for the measure by id
- voteFor(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
Auto discovery is attempted and if possible the method will proceed using the discovered shares
cast an affirmative vote for the measure by id
- voteFor(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
cast an affirmative vote for the measure by id
- voteFor(uint256,uint256,uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
cast an affirmative vote for the measure by id
- voteFor(uint256, uint256[])
- Parameters:
_proposalId – The numeric id of the proposed vote
_shareList – A array of tokens or shares that confer the right to vote
cast an affirmative vote for the measure by id
- voteFor(uint256, uint256[], uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – The numeric id of the proposed vote
_tokenIdList – A array of tokens or shares that confer the right to vote
cast an affirmative vote for the measure by id
- withdrawRebate()
withdraw available rebate
- withdrawRebate(address)
- Parameters:
_recipient – The address to withdraw the rebate to
withdraw available rebate
Governance
- interface Governance
- addChoice(uint256,bytes32,string,uint256)
- Parameters:
_description – the detailed description of the choice
_name – the name of the metadata field
_proposalId – the id of the proposal
_transactionId – The id of the transaction to execute
- Returns:
uint256 The choiceId
- Notice:
requires supervisor
add a choice
- attachTransaction(uint256,address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_proposalId – the id of the proposal
_scheduleTime – the expected call time, within the timelock grace, for the transaction
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
uint256 the transactionId
- Notice:
required prior to calling configure
Attach a transaction to the specified proposal. If successfull, it will be executed when voting is ended.
- cancel(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
cancel a proposal if it is not yet open
- cancelRebate(address)
- Parameters:
_recipient – The address to cancel the rebate for
cancel rebate for recipient
- configure(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_quorumRequired – The threshold of participation that is required for a successful conclusion of voting
configure an existing proposal by id
- configure(uint256,uint256,uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_quorumThreshold – The threshold of participation that is required for a successful conclusion of voting
_requiredDelay – The minimum time required before the start of voting
_requiredDuration – The minimum time for voting to proceed before ending the vote is allowed
configure an existing proposal by id
- endVote(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
end voting on an existing proposal by id
- isOpen(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Returns:
bool True if the proposal is open
test if an existing proposal is open
- name()
- Returns:
string memory representation of name
return the name of this implementation
- propose()
- Returns:
uint256 The id of the new proposal
propose a vote for the community
- rebateBalance()
return the rebate funds available
- startVote(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
start the voting process by proposal id
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
- withdrawRebate()
withdraw available rebate funds
- withdrawRebate(address)
- Parameters:
_recipient – The address to send the rebate to
withdraw available rebate funds
GovernanceBuilder
- contract GovernanceBuilder
- aGovernance()
- Returns:
GovernanceBuilder this contract
initialize and create a new builder context for this sender
- build()
- Notice:
contructs a new contract and may require a large gas fee, does not reinitialize context
build the specified contract
- contractRegistered(address)
- Returns:
bool True if contract was created by this builder
identify a contract that was created by this builder
- initialize(address,address,address)
- Parameters:
_govFactory – the governance factory address
_mStorageFactory – the meta storage factory address
_sFactory – the storage factory address
- name()
- Returns:
string memory representation of name
return the name of this implementation
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- reset()
remove storage used by builder
- supportsInterface(bytes4)
see ERC-165
- upgrade(address,address,address,uint8)
- Parameters:
_govFactory – the governance factory address
_mStorageFactory – the meta storage factory address
_sFactory – the storage factory address
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- withCommunityClass(address)
- Parameters:
_class – the address of the VoterClass contract
- Returns:
GovernanceBuilder this contract
- Notice:
the type safe VoterClass for use within Solidity code
set the VoterClass to be used for the next constructed contract
- withCommunityClassAddress(address)
- Parameters:
_classAddress – the address of the VoterClass contract
- Returns:
GovernanceBuilder this contract
set the VoterClass to be used for the next constructed contract
- withDescription(bytes32,string,string)
- Parameters:
_description – the description
_name – the name
_url – the url
- Returns:
GovernanceBuilder this contract
- Notice:
this helper calls withName, withUrl and WithDescription
set the community information
- withDescription(string)
- Parameters:
_description – the description
- Returns:
GovernanceBuilder this contract
- Notice:
limit 1k
set the community description
- withName(bytes32)
- Parameters:
_name – the name
- Returns:
GovernanceBuilder this contract
set the community name
- withUrl(string)
- Parameters:
_url – the url
- Returns:
GovernanceBuilder this contract
set the community url
GovernanceBuilderProxy
- contract GovernanceBuilderProxy
- constructor()
- Parameters:
_govFactory – the GovernanceFactory
_implementation – the address of the implementation contract
_metaStorageFactory – the MetaStorageFactory
_storageFactory – the StorageFactory
create new proxy
- upgrade(address,address,address,address,uint8)
- Parameters:
_govFactory – the GovernanceFactory
_implementation – the address of the implementation contract
_metaStorageFactory – the MetaStorageFactory
_storageFactory – the StorageFactory
_version – the implementation contract version
GovernanceFactory
- contract GovernanceFactory
- create(address,address,address)
- Parameters:
_class – the VoterClass for this project
_storage – The storage contract for this governance
_timeLock – The timelock for the contract
- Notice:
this should be invoked through the GovernanceBuilder
create a new collective governance contract
- supportsInterface(bytes4)
see ERC-165
- version()
- Returns:
uint32 the version number
return the version number of this contract
VoteStrategy
- interface VoteStrategy
- abstainFrom(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
abstain from vote by id
- abstainFrom(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
abstain from vote by id
- abstainFrom(uint256, uint256[])
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenIdList – A array of tokens or shares that confer the right to vote
abstain from vote by id
- getVoteSucceeded(uint256)
- Returns:
bool True if the vote is closed and passed
- Notice:
This method will fail if the vote was vetoed
get the result of the vote
- veto(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
- Notice:
transaction must be signed by a supervisor wallet
veto proposal by id
- voteAgainst(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
cast an against vote by id
- voteAgainst(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
cast an against vote by id
- voteAgainst(uint256, uint256[])
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenIdList – A array of tokens or shares that confer the right to vote
cast an against vote by id
- voteChoice(uint256,uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – The numeric id of the proposed vote
cast an affirmative vote for the measure by id
- voteFor(uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
cast an affirmative vote for the measure by id
- voteFor(uint256,uint256)
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
cast an affirmative vote for the measure by id
- voteFor(uint256,uint256,uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – The numeric id of the proposed vote
_tokenId – The id of a token or share representing the right to vote
cast an affirmative vote for the measure by id
- voteFor(uint256, uint256[])
- Parameters:
_proposalId – The numeric id of the proposed vote
_tokenIdList – A array of tokens or shares that confer the right to vote
cast an affirmative vote for the measure by id
- voteFor(uint256, uint256[], uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – The numeric id of the proposed vote
_tokenIdList – A array of tokens or shares that confer the right to vote
cast an affirmative vote for the measure by id
GovernanceStorage
- contract GovernanceStorage
- NAME()
contract name
- _proposalMap(uint256)
global map of proposed issues by id
- abstainForShare(uint256,address,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an abstention for the specified share
- abstentionCount(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number abstentions
get the number of abstentions
- addChoice(uint256, (bytes32, string, uint256, bytes32, uint256), address)
- Parameters:
_choice – the choice
_proposalId – the id of the proposal
_sender – The sender of the choice
- Returns:
uint256 The choiceId
- Notice:
requires supervisor
set a choice by choice id
- addTransaction(uint256, (address, uint256, string, bytes, uint256), address)
- Parameters:
_proposalId – the id of the proposal
_sender – for this proposal
_transaction – the transaction
- Returns:
uint256 the id of the transaction that was added
add a transaction to the specified proposal
- againstVotes(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number of against votes
get the against vote count
- burnSupervisor(uint256,address,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_supervisor – the supervisor address
- Notice:
requires proposal creator
remove a supervisor from the proposal along with its ability to change or veto
- cancel(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
- Notice:
requires supervisor
cancel the proposal if it is not yet started
- choiceCount(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint current number of choices
get the number of attached choices
- clearTransaction(uint256,uint256,address)
- Parameters:
_proposalId – the proposal where the transaction is stored
_sender – The message sender
_transactionId – The id of the transaction on the proposal
clear a stored transaction
- communityClass()
- Returns:
CommunityClass the voter class for this store
get the VoterClass used for this voting store
- constructor()
- Parameters:
_class – the contract that defines the popluation
create a new storage object with VoterClass as the voting population
- endTime(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the end time
- Notice:
timestamp in epoch seconds since January 1, 1970
get the end time
- forVotes(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number of votes in favor
get the for vote count
- getChoice(uint256,uint256)
- Parameters:
_choiceId – the id of the choice
_proposalId – the id of the proposal
- Returns:
Choice the choice
get the choice by id
- getSender(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
address the address of the sender
get the address of the proposal sender
- getTransaction(uint256,uint256)
- Parameters:
_proposalId – the proposal where the transaction is stored
_transactionId – The id of the transaction on the proposal
- Returns:
Transaction the transaction
return the stored transaction by id
- getVoteReceipt(uint256,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share voted
get the vote receipt
- getWinningChoice(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint The winning choice
- Notice:
quorum is ignored for this caluclation
return the choice with the highest vote count
- initializeProposal(address)
- Parameters:
_sender – the proposal sender
- Returns:
uint256 the id of the proposal
initialize a new proposal and return the id
- isCancel(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if the proposal is marked cancelled
test if proposal is cancelled
- isChoiceVote(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if proposal is a choice vote
test if proposal is a choice vote
- isExecuted(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if already executed
get the current state if executed or not
- isFinal(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if the proposal is marked ready
test if proposal is ready or in the setup phase
- isSupervisor(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_supervisor – the address to check
- Returns:
bool true if the address is a supervisor
test if the address is a supervisor on the specified proposal
- isVeto(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if the proposal is marked veto
test if proposal is veto
- isVoter(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_voter – the address to check
- Returns:
bool true if the address is a voter
test if address is a voter on the specified proposal
- latestProposal(address)
- Returns:
uint256 the id of the most recent proposal for sender
get the id of the last proposal for sender
- makeFinal(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
- Notice:
requires supervisor
indicate the proposal is ready for voting and should be frozen
- name()
- Returns:
string memory representation of name
return the name of this implementation
- owner()
- Notice:
Returns the address of the current owner.
- quorum(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the amount of participation
get the current number counting towards quorum
- quorumRequired(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number required for quorum
get the quorum required
- registerSupervisor(uint256,address,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_supervisor – the supervisor address
- Notice:
requires proposal creator
Register a new supervisor on the specified proposal. The supervisor has rights to add or remove voters prior to start of voting in a Voter Pool. The supervisor also has the right to veto the outcome of the vote.
- registerSupervisor(uint256,address,bool,address)
- Parameters:
_isProject – true if project supervisor
_proposalId – the id of the proposal
_sender – original wallet for this request
_supervisor – the supervisor address
- Notice:
requires proposal creator
Register a new supervisor on the specified proposal. The supervisor has rights to add or remove voters prior to start of voting in a Voter Pool. The supervisor also has the right to veto the outcome of the vote.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- setExecuted(uint256)
- Parameters:
_proposalId – the id of the proposal
set proposal state executed
- setQuorumRequired(uint256,uint256,address)
- Parameters:
_proposalId – the id of the proposal
_quorum – the number required for quorum
_sender – original wallet for this request
- Notice:
requires supervisor
set the minimum number of participants for a successful outcome
- setVoteDelay(uint256,uint256,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_voteDelay – the vote delay in seconds
- Notice:
requires supervisor
set the delay period required to preceed the vote
- setVoteDuration(uint256,uint256,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_voteDuration – the vote duration in seconds
- Notice:
requires supervisor
set the required duration for the vote
- startTime(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the start time
- Notice:
timestamp in epoch seconds since January 1, 1970
get the start time
- supportsInterface(bytes4)
see ERC-165
- transactionCount(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 current number of transactions
get the number of attached transactions
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- veto(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_sender – the address of the veto sender
- Notice:
supervisor is required
veto the specified proposal
- voteAgainstByShare(uint256,address,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an against vote for the specified share
- voteCount(uint256,uint256)
- Parameters:
_choiceId – the id of the choice
_proposalId – the id of the proposal
- Returns:
uint256 the number of votes in favor
get the for vote count for a choice
- voteDelay(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the delay
- Notice:
return value is seconds
get the vote delay
- voteDuration(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the duration
- Notice:
return value is seconds
get the vote duration
- voteForByShare(uint256,address,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an affirmative vote for the specified share
- voteForByShare(uint256,address,uint256,uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an affirmative vote for the specified share
MappedMetaStorage
- contract MappedMetaStorage
- add(uint256, bytes32, string)
- Parameters:
_metaId – the id of the metadata to modify
_name – the name of the metadata field
_value – the value of the metadata
- Returns:
uint256 the id of the attached element
- Notice:
requires owner
attach arbitrary metadata
- community()
- Returns:
bytes32 the community name
return the name of the community
- constructor()
- Parameters:
_community – The community name
_description – The community description
_url – The Url for this community
create a new storage object
- describe(uint256,string,string)
- Parameters:
_description – the description
_metaId – the id of the metadata
_url – the url
- Notice:
requires owner
set metadata
- description()
- Returns:
string memory representation of community description
return community description
- description(uint256)
- Parameters:
_metaId – the id of the metadata
- Returns:
string the description
get the metadata description by id
- get(uint256,uint256)
- Parameters:
_metaElementId – the id of the element
_metaId – the id of the metadata
- Returns:
Meta the metadata element
get arbitrary metadata element
- metaStoreMap(uint256)
global map of metadata storage
- name()
- Returns:
string memory representation of name
return the name of this implementation
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- size(uint256)
- Parameters:
_metaId – the id of the metadata
- Returns:
uint256 current number of meta elements
get the number of attached metadata
- supportsInterface(bytes4)
see ERC-165
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
- url()
- Returns:
string memory representation of url
return the community url
- url(uint256)
- Parameters:
_metaId – the id of the metadata
- Returns:
string the url
get the url by id
- version()
- Returns:
uint32 the version number
return the version number of this contract
MetaStorage
- interface MetaStorage
- add(uint256, bytes32, string)
- Parameters:
_metaId – the id of the metadata
_name – the name of the metadata field
_value – the value of the metadata
- Returns:
uint256 the meta element id
- Notice:
requires ownera
attach arbitrary metadata to metadata
- community()
- Returns:
bytes32 the community name
return the name of the community
- describe(uint256,string,string)
- Parameters:
_description – the description
_metaId – the id of the metadata
_url – the url
- Notice:
requires owner
set metadata
- description()
- Returns:
string memory representation of community description
return community description
- description(uint256)
- Parameters:
_metaId – the id of the metadata
- Returns:
string the url
get the metadata description
- get(uint256,uint256)
- Parameters:
_metaElementId – the id of the metadata
_metaId – the id of the metadata
- Returns:
Meta the meta data
get arbitrary metadata from metadata
- name()
- Returns:
string memory representation of name
return the name of this implementation
- size(uint256)
- Parameters:
_metaId – the id of the metadata
- Returns:
uint256 current number of meta elements
get the number of attached metadata
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
- url()
- Returns:
string memory representation of url
return the community url
- url(uint256)
- Parameters:
_metaId – the id of the metadata
- Returns:
string the url
get the metadata url
MetaStorageFactory
- contract MetaStorageFactory
- create(bytes32,string,string)
- Parameters:
_community – The community name
_description – The community description
_url – The Url for this community
- Returns:
MetaStorage the storage
create meta storage
- supportsInterface(bytes4)
see ERC-165
- version()
- Returns:
uint32 the version number
return the version number of this contract
Storage
- interface Storage
- abstainForShare(uint256,address,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an abstention for the specified share
- abstentionCount(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number abstentions
get the number of abstentions
- addChoice(uint256, (bytes32, string, uint256, bytes32, uint256), address)
- Parameters:
_choice – the choice
_proposalId – the id of the proposal
_sender – The sender of the choice
- Returns:
uint256 The choiceId
- Notice:
requires supervisor
set a choice by choice id
- addTransaction(uint256, (address, uint256, string, bytes, uint256), address)
- Parameters:
_proposalId – the id of the proposal
_sender – for this proposal
_transaction – the transaction
- Returns:
uint256 the id of the transaction that was added
add a transaction to the specified proposal
- againstVotes(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number of against votes
get the against vote count
- burnSupervisor(uint256,address,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_supervisor – the supervisor address
- Notice:
requires proposal creator
remove a supervisor from the proposal along with its ability to change or veto
- cancel(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
- Notice:
requires supervisor
cancel the proposal if it is not yet started
- choiceCount(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint current number of choices
get the number of attached choices
- clearTransaction(uint256,uint256,address)
- Parameters:
_proposalId – the proposal where the transaction is stored
_transactionId – The id of the transaction on the proposal
clear a stored transaction
- communityClass()
- Returns:
CommunityClass the voter class
get the CommunityClass
- endTime(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the end time
- Notice:
timestamp in epoch seconds since January 1, 1970
get the end time
- forVotes(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number of votes in favor
get the for vote count
- getChoice(uint256,uint256)
- Parameters:
_choiceId – the id of the choice
_proposalId – the id of the proposal
- Returns:
Choice the choice
get the choice by id
- getSender(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
address the address of the sender
get the address of the proposal sender
- getTransaction(uint256,uint256)
- Parameters:
_proposalId – the proposal where the transaction is stored
_transactionId – The id of the transaction on the proposal
- Returns:
Transaction the transaction
return the stored transaction by id
- getVoteReceipt(uint256,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share voted
get the vote receipt
- getWinningChoice(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 The winning choice
- Notice:
quorum is ignored for this caluclation
return the choice with the highest vote count
- initializeProposal(address)
- Parameters:
_sender – the proposal sender
- Returns:
uint256 the id of the proposal
initialize a new proposal and return the id
- isCancel(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if the proposal is marked cancelled
test if proposal is cancelled
- isChoiceVote(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if proposal is a choice vote
test if proposal is a choice vote
- isExecuted(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if already executed
get the current state if executed or not
- isFinal(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if the proposal is marked ready
test if proposal is ready or in the setup phase
- isSupervisor(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_supervisor – the address to check
- Returns:
bool true if the address is a supervisor
test if the address is a supervisor on the specified proposal
- isVeto(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
bool true if the proposal is marked veto
test if proposal is veto
- isVoter(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_voter – the address to check
- Returns:
bool true if the address is a voter
test if address is a voter on the specified proposal
- latestProposal(address)
- Returns:
uint256 the id of the most recent proposal for sender
get the id of the last proposal for sender
- makeFinal(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
- Notice:
requires supervisor
indicate the proposal is ready for voting and should be frozen
- name()
- Returns:
string memory representation of name
return the name of this implementation
- quorum(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the amount of participation
get the current number counting towards quorum
- quorumRequired(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the number required for quorum
get the quorum required
- registerSupervisor(uint256,address,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_supervisor – the supervisor address
- Notice:
requires proposal creator
Register a new supervisor on the specified proposal. The supervisor has rights to add or remove voters prior to start of voting in a Voter Pool. The supervisor also has the right to veto the outcome of the vote.
- registerSupervisor(uint256,address,bool,address)
- Parameters:
_isProject – true if supervisor is project supervisor
_proposalId – the id of the proposal
_sender – original wallet for this request
_supervisor – the supervisor address
- Notice:
requires proposal creator
Register a new supervisor on the specified proposal. The supervisor has rights to add or remove voters prior to start of voting in a Voter Pool. The supervisor also has the right to veto the outcome of the vote.
- setExecuted(uint256)
- Parameters:
_proposalId – the id of the proposal
set proposal state executed
- setQuorumRequired(uint256,uint256,address)
- Parameters:
_proposalId – the id of the proposal
_quorum – the number required for quorum
_sender – original wallet for this request
- Notice:
requires supervisor
set the minimum number of participants for a successful outcome
- setVoteDelay(uint256,uint256,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_voteDelay – the quorum number
- Notice:
requires supervisor
set the delay period required to preceed the vote
- setVoteDuration(uint256,uint256,address)
- Parameters:
_proposalId – the id of the proposal
_sender – original wallet for this request
_voteDuration – the quorum number
- Notice:
requires supervisor
set the required duration for the vote
- startTime(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the start time
- Notice:
timestamp in epoch seconds since January 1, 1970
get the start time
- supportsInterface(bytes4)
- Notice:
Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
- transactionCount(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 current number of transactions
get the number of attached transactions
- veto(uint256, address)
- Parameters:
_proposalId – the id of the proposal
_sender – the address of the veto sender
- Notice:
supervisor is required
veto the specified proposal
- voteAgainstByShare(uint256,address,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an against vote for the specified share
- voteCount(uint256,uint256)
- Parameters:
_choiceId – the id of the choice
_proposalId – the id of the proposal
- Returns:
uint256 the number of votes in favor
get the vote count for a choice
- voteDelay(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the delay
- Notice:
return value is seconds
get the vote delay
- voteDuration(uint256)
- Parameters:
_proposalId – the id of the proposal
- Returns:
uint256 the duration
- Notice:
return value is seconds
get the vote duration
- voteForByShare(uint256,address,uint256)
- Parameters:
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an affirmative vote for the specified share
- voteForByShare(uint256,address,uint256,uint256)
- Parameters:
_choiceId – The choice to vote for
_proposalId – the id of the proposal
_shareId – the id of the share
_wallet – the wallet represented for the vote
- Returns:
uint256 the number of votes cast
cast an affirmative vote for the specified share
StorageFactory
- contract StorageFactory
- create(address)
- Parameters:
_class – the contract that defines the popluation
- Returns:
Storage the created instance
create a new storage object with VoterClass as the voting population
- owner()
- Notice:
Returns the address of the current owner.
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- supportsInterface(bytes4)
see ERC-165
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
- version()
- Returns:
uint32 the version number
return the version number of this contract
TimeLock
- contract TimeLock
- _queuedTransaction(bytes32)
table of transaction hashes, map to true if seen by the queueTransaction operation
- cancelTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected time when the _target should be available to call
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
cancel a queued transaction from the timelock
- constructor()
- Parameters:
_lockDuration – The time delay required for the time lock
- executeTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected time when the _target should be available to call
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
bytes The return data from the executed call
- Notice:
It is only possible to execute a queued transaction therefore anyone may initiate the call
If the time lock is concluded, execute the scheduled transaction.
- owner()
- Notice:
Returns the address of the current owner.
- queueTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected time when the _target should be available to call
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
bytes32 the hash value for the transaction used for the internal index
- Notice:
It is only possible to execute a queued transaction. Queueing in the context of a TimeLock is the process of identifying in advance or naming the transaction to be executed. Nothing is actually queued.
Mark a transaction as queued for this time lock
- queuedTransaction(bytes32)
- Parameters:
_txHash – Transaction hash to check
- Returns:
bool True if transaction is queued and false otherwise
get a queued transaction
- renounceOwnership()
- Notice:
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
- transferOwnership(address)
- Notice:
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
TimeLocker
- interface TimeLocker
- cancelTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected time when the _target should be available to call
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Notice:
this method unmarks the named transaction so that it may not be executed
cancel a queued transaction from the timelock
- executeTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected time when the _target should be available to call
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
bytes The return data from the executed call
- Notice:
It is only possible to execute a queued transaction.
Execute the scheduled transaction at the end of the time lock or scheduled time.
- queueTransaction(address,uint256,string,bytes,uint256)
- Parameters:
_calldata – the call data to pass to the call
_scheduleTime – the expected time when the _target should be available to call
_signature – the tranaction signature
_target – the target address for this transaction
_value – the value to pass to the call
- Returns:
bytes32 the hash value for the transaction used for the internal index
- Notice:
It is only possible to execute a queued transaction. Queueing in the context of a TimeLock is the process of identifying in advance or naming the transaction to be executed. Nothing is actually queued.
Mark a transaction as queued for this time lock
- queuedTransaction(bytes32)
- Parameters:
_txHash – Transaction hash to check
- Returns:
bool True if transaction is queued and false otherwise
get a queued transaction
Treasury
- contract Treasury
- approve(address, uint256)
- Parameters:
_quantity – the amount of the approved transfer
_to – the address approved to withdraw the amount
approve transfer of _quantity
- approveMulti(address, uint256, uint256, bytes[])
- Parameters:
_quantity – to approve
_scheduleTime – the scheduled time
_signature – array of signature as bytes
_to – the address of the recipient
- Notice:
_scheduleTime is subject to timelock constraints
Approve and schedule a payment to recipient in one transaction. Each required approver must individually sign a message that represents the standardized transaction for the payment transfer as follows keccak256(abi.encode(_to, _quantity, “”, “”, _scheduleTime)) Each approver must sign off chain and the signatures passed to this function.
- balance()
total balance on treasury
- balance(address)
- Parameters:
_from – the address of the wallet to check
balance approved for the specified address
- cancel(address)
- Parameters:
_to – the approved recipient
- Notice:
It is only safe to cancel a transaction within TIMELOCK_MINIMUM_DELAY (currently 1 day) seconds of the eventual schedule time. An approval may be possible to ‘replay’ and succeed prior to that time. Later, any replay approval would fail the timelock constraints. It is advisable to schedule all transactions at or near TIMELOCK_MINIMUM_DELAY. A grace of a few minutes might be useful to ensure transactions complete safely, but the operator should be aware of these timings and careful that cancellations are timely.
cancel the approved payment
- constructor()
- Parameters:
_approver – A set of addresses to be used as approvers
_minimumApprovalRequirement – The number number of approvers before a transaction can be pending
_minimumTimeLock – The minimum time for any transaction to be processed
construct the Treasury
- deposit()
- Notice:
payable
deposit msg.value in the vault
- pay()
pay quantity to msg.sender
- transferTo(address)
- Parameters:
_to – the address to pay
- Notice:
requires approval
transfer approved quantity to
TreasuryBuilder
- contract TreasuryBuilder
- aTreasury()
- Returns:
TreasuryBuilder this contract
begin the process of building the treasury by creating a new mapping for sender
- name()
- Returns:
string memory representation of name
- proxiableUUID()
- Notice:
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation’s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated modifier.
- supportsInterface(bytes4)
see ERC-165
- upgradeTo(address)
- Notice:
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- upgradeToAndCall(address, bytes)
- Notice:
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
- version()
- Returns:
uint32 the version number
return the version number of this contract
- withApprover(address)
- Parameters:
_approver – the approver address
add an approver
- withMinimumApprovalRequirement(uint256)
- Parameters:
_requirement – The minimum requirement
- Returns:
TreasuryBuilder this contract
set the approval requirement
- withTimeLockDelay(uint256)
- Parameters:
_timelockDelay – the minimum delay
- Returns:
TreasuryBuilder this contract
set the minimum timelock delay
TreasuryBuilderProxy
- contract TreasuryBuilderProxy
Vault
- interface Vault
- approve(address, uint256)
- Parameters:
_quantity – the amount of the approved transfer
_to – the address approved to withdraw the amount
approve transfer of _quantity
- approveMulti(address, uint256, uint256, bytes[])
- Parameters:
_quantity – to approve
_scheduleTime – the scheduled time
_signature – array of signature as bytes
_to – the address of the recipient
- Notice:
_scheduleTime is subject to timelock constraints
Approve and schedule a payment to recipient in one transaction. Each required approver must individually sign a message that represents the standardized transaction for the payment transfer as follows keccak256(abi.encode(_to, _quantity, “”, “”, _scheduleTime)) Each approver must sign off chain and the signatures passed to this function.
- balance()
total balance on treasury
- balance(address)
- Parameters:
_from – the address of the wallet to check
balance approved for the specified address
- cancel(address)
- Parameters:
_to – the approved recipient
cancel the approved payment
- deposit()
- Notice:
payable
deposit msg.value in the vault
- pay()
pay quantity to msg.sender
- transferTo(address)
- Parameters:
_to – the address to pay
- Notice:
requires approval
transfer approved quantity to