Baal Function Overview
Setup
function setUp(bytes _initializationParams) external nonpayable
Summon Baal with voting configuration & initial array of members
accounts with shares
& loot
weights.
Name | Type | Description |
---|
_initializationParams | bytes | Encoded setup information. |
Proposals
function submitProposal(bytes proposalData, uint32 expiration, uint256 baalGas, string details) external payable returns (uint256)
Submit proposal to Baal members
for approval within given voting period.
Name | Type | Description |
---|
proposalData | bytes | Multisend encoded transactions or proposal data |
expiration | uint32 | undefined |
baalGas | uint256 | undefined |
details | string | Context for proposal. |
Name | Type | Description |
---|
_0 | uint256 | proposal Count for submitted proposal. |
function sponsorProposal(uint32 id) external nonpayable
Sponsor proposal to Baal members
for approval within voting period.
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals mapping to sponsor. |
function processProposal(uint32 id, bytes proposalData) external nonpayable
Process proposal
& execute internal functions.
Proposal must have succeeded, not been processed, not expired, retention threshold must be met
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals mapping to process for execution. |
proposalData | bytes | Packed multisend data to execute via Gnosis multisend library |
function cancelProposal(uint32 id) external nonpayable
Cancel proposal prior to execution
Cancellable if proposal is during voting, sender is sponsor, governor, or if sponsor has fallen below threshold
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals mapping to process for execution. |
function executeAsBaal(address _to, uint256 _value, bytes _data) external nonpayable
Can only be called by the avatar which means this can only be called if passed by another proposal or by a delegated signer on the Safe
Function to Execute arbitrary code as baal - useful if funds are accidentally sent here
Name | Type | Description |
---|
_to | address | address to call |
_value | uint256 | value to include in wei |
_data | bytes | arbitrary transaction data |
Members
function ragequit(address to, uint256 sharesToBurn, uint256 lootToBurn, address[] tokens) external nonpayable
Process member burn of shares
and/or loot
to claim 'fair share' of specified tokens
Name | Type | Description |
---|
to | address | Account that receives 'fair share'. |
sharesToBurn | uint256 | Baal voting weight to burn. |
lootToBurn | uint256 | Baal pure economic weight to burn. |
tokens | address[] | Array of tokens to include in rage quit calculation |
function submitVote(uint32 id, bool approved) external nonpayable
Submit vote - proposal must exist & voting period must not have ended.
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals mapping to cast vote on. |
approved | bool | If 'true', member will cast yesVotes onto proposal - if 'false', noVotes will be counted. |
function submitVoteWithSig(uint32 id, bool approved, bytes signature) external nonpayable
Submit vote with EIP-712 signature - proposal must exist & voting period must not have ended.
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals mapping to cast vote on. |
approved | bool | If 'true', member will cast yesVotes onto proposal - if 'false', noVotes will be counted. |
signature | bytes | Concatenated signature |
Guild Management
function setShamans(address[] _shamans, uint256[] _permissions) external nonpayable
Baal-only function to set shaman status.
Name | Type | Description |
---|
_shamans | address[] | Addresses of shaman contracts |
_permissions | uint256[] | Permission level of each shaman in _shamans |
function lockAdmin() external nonpayable
Lock admin so setShamans cannot be called with admin changes
function lockGovernor() external nonpayable
Lock governor so setShamans cannot be called with governor changes
function lockManager() external nonpayable
Lock manager so setShamans cannot be called with manager changes
Shaman Functions
function setAdminConfig(bool pauseShares, bool pauseLoot) external nonpayable
Baal-or-admin-only function to set admin config (pause/unpause shares/loot)
Name | Type | Description |
---|
pauseShares | bool | Turn share transfers on or off |
pauseLoot | bool | Turn loot transfers on or off |
function setGovernanceConfig(bytes _governanceConfig) external nonpayable
Baal-or-governance-only function to change periods.
Name | Type | Description |
---|
_governanceConfig | bytes | Encoded configuration parameters voting, grace period, tribute, quorum, sponsor threshold, retention bound |
function mintShares(address[] to, uint256[] amount) external nonpayable
Baal-or-manager-only function to mint shares.
Name | Type | Description |
---|
to | address[] | Array of addresses to receive shares |
amount | uint256[] | Array of amounts to mint |
function mintLoot(address[] to, uint256[] amount) external nonpayable
Baal-or-manager-only function to mint loot.
Name | Type | Description |
---|
to | address[] | Array of addresses to mint loot |
amount | uint256[] | Array of amounts to mint |
function burnLoot(address[] from, uint256[] amount) external nonpayable
Baal-or-manager-only function to burn loot.
Name | Type | Description |
---|
from | address[] | Array of addresses to lose loot |
amount | uint256[] | Array of amounts to burn |
function burnShares(address[] from, uint256[] amount) external nonpayable
Baal-or-manager-only function to burn shares.
Name | Type | Description |
---|
from | address[] | Array of addresses to lose shares |
amount | uint256[] | Array of amounts to burn |
Getters
function state(uint32 id) external view returns (enum Baal.ProposalState)
State helper to determine proposal state
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals |
Name | Type | Description |
---|
_0 | enum Baal.ProposalState | Unborn -> Submitted -> Voting -> Grace -> Ready -> Processed -> Cancelled -> Defeated |
function getProposalStatus(uint32 id) external view returns (bool[4])
Helper to get recorded proposal flags
Name | Type | Description |
---|
id | uint32 | Number of proposal in proposals |
Name | Type | Description |
---|
_0 | bool[4] | [cancelled, processed, passed, actionFailed] |
function getCurrentVotes(address account) external view returns (uint256 votes)
Returns the current delegated vote
balance for account
.
Name | Type | Description |
---|
account | address | The user to check delegated votes for. |
Name | Type | Description |
---|
votes | uint256 | Current votes delegated to account . |
function getPriorVotes(address account, uint256 timeStamp) external view returns (uint256 votes)
Returns the prior number of votes
for account
as of timeStamp
.
Name | Type | Description |
---|
account | address | The user to check votes for. |
timeStamp | uint256 | The unix time to check votes for. |
Name | Type | Description |
---|
votes | uint256 | Prior votes delegated to account . |
function isAdmin(address shaman) external view returns (bool)
Helper to check if shaman permission contains admin capabilities
Name | Type | Description |
---|
shaman | address | Address attempting to execute admin permissioned functions |
Name | Type | Description |
---|
_0 | bool | undefined |
function isGovernor(address shaman) external view returns (bool)
Helper to check if shaman permission contains governor capabilities
Name | Type | Description |
---|
shaman | address | Address attempting to execute governor permissioned functions |
Name | Type | Description |
---|
_0 | bool | undefined |
function isManager(address shaman) external view returns (bool)
Helper to check if shaman permission contains manager capabilities
Name | Type | Description |
---|
shaman | address | Address attempting to execute manager permissioned functions |
Name | Type | Description |
---|
_0 | bool | undefined |
totalLoot
function totalLoot() external view returns (uint256)
Helper to check total supply of child loot contract
Name | Type | Description |
---|
_0 | uint256 | undefined |
function totalShares() external view returns (uint256)
Helper to check total supply of child shares contract
Name | Type | Description |
---|
_0 | uint256 | undefined |
function totalSupply() external view returns (uint256)
Helper to check total supply of loot and shares
Name | Type | Description |
---|
_0 | uint256 | undefined |
Helpers
function hashOperation(bytes _transactions) external pure returns (bytes32 hash)
Returns the keccak256 hash of calldata
Name | Type | Description |
---|
_transactions | bytes | undefined |
Name | Type | Description |
---|
hash | bytes32 | undefined |