Baal
Baal ';_;'.
Flexible guild contract inspired by Moloch DAO framework.
function adminLock() external view returns (bool)
Name | Type | Description |
---|
_0 | bool | undefined |
function allowance(address, address) external view returns (uint256)
Name | Type | Description |
---|
_0 | address | undefined |
_1 | address | undefined |
Name | Type | Description |
---|
_0 | uint256 | undefined |
function avatar() external view returns (address)
Name | Type | Description |
---|
_0 | address | undefined |
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 |
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 encodeMultisend(bytes[] _calls, address _target) external pure returns (bytes encodedMultisend)
Name | Type | Description |
---|
_calls | bytes[] | undefined |
_target | address | undefined |
Name | Type | Description |
---|
encodedMultisend | bytes | undefined |
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 |
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 getGuard() external view returns (address _guard)
Name | Type | Description |
---|
_guard | address | undefined |
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 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 governorLock() external view returns (bool)
Name | Type | Description |
---|
_0 | bool | undefined |
function gracePeriod() external view returns (uint32)
Name | Type | Description |
---|
_0 | uint32 | undefined |
function guard() external view returns (address)
Name | Type | Description |
---|
_0 | address | undefined |
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 |
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 |
function latestSponsoredProposalId() external view returns (uint32)
Name | Type | Description |
---|
_0 | uint32 | undefined |
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
function lootPaused() external view returns (bool)
Name | Type | Description |
---|
_0 | bool | undefined |
function lootToken() external view returns (contract IBaalToken)
Name | Type | Description |
---|
_0 | contract IBaalToken | undefined |
function managerLock() external view returns (bool)
Name | Type | Description |
---|
_0 | bool | undefined |
function memberVoted(address, uint32) external view returns (bool)
Name | Type | Description |
---|
_0 | address | undefined |
_1 | uint32 | undefined |
Name | Type | Description |
---|
_0 | bool | undefined |
function minRetentionPercent() external view returns (uint256)
Name | Type | Description |
---|
_0 | uint256 | undefined |
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 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 nonces(address) external view returns (uint256)
Name | Type | Description |
---|
_0 | address | undefined |
Name | Type | Description |
---|
_0 | uint256 | undefined |
function owner() external view returns (address)
Returns the address of the current owner.
Name | Type | Description |
---|
_0 | address | undefined |
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 proposalCount() external view returns (uint32)
Name | Type | Description |
---|
_0 | uint32 | undefined |
function proposalOffering() external view returns (uint256)
Name | Type | Description |
---|
_0 | uint256 | undefined |
function proposals(uint256) external view returns (uint32 id, uint32 prevProposalId, uint32 votingStarts, uint32 votingEnds, uint32 graceEnds, uint32 expiration, uint256 baalGas, uint256 yesVotes, uint256 noVotes, uint256 maxTotalSharesAndLootAtYesVote, address sponsor, bytes32 proposalDataHash, string details)
Name | Type | Description |
---|
_0 | uint256 | undefined |
Name | Type | Description |
---|
id | uint32 | undefined |
prevProposalId | uint32 | undefined |
votingStarts | uint32 | undefined |
votingEnds | uint32 | undefined |
graceEnds | uint32 | undefined |
expiration | uint32 | undefined |
baalGas | uint256 | undefined |
yesVotes | uint256 | undefined |
noVotes | uint256 | undefined |
maxTotalSharesAndLootAtYesVote | uint256 | undefined |
sponsor | address | undefined |
proposalDataHash | bytes32 | undefined |
details | string | undefined |
function quorumPercent() external view returns (uint256)
Name | Type | Description |
---|
_0 | uint256 | undefined |
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 renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
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 setAvatar(address _avatar) external nonpayable
Can only be called by the current owner.
Sets the avatar to a new avatar (newAvatar
).
Name | Type | Description |
---|
_avatar | address | undefined |
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 setGuard(address _guard) external nonpayable
Set a guard that checks transactions before execution.
Name | Type | Description |
---|
_guard | address | The address of the guard to be used or the 0 address to disable the guard. |
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 setTarget(address _target) external nonpayable
Can only be called by the current owner.
Sets the target to a new target (newTarget
).
Name | Type | Description |
---|
_target | address | undefined |
function shamans(address) external view returns (uint256)
Name | Type | Description |
---|
_0 | address | undefined |
Name | Type | Description |
---|
_0 | uint256 | undefined |
function sharesPaused() external view returns (bool)
Name | Type | Description |
---|
_0 | bool | undefined |
function sharesToken() external view returns (contract IBaalToken)
Name | Type | Description |
---|
_0 | contract IBaalToken | undefined |
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 sponsorThreshold() external view returns (uint256)
Name | Type | Description |
---|
_0 | uint256 | undefined |
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 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 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 |
function target() external view returns (address)
Name | Type | Description |
---|
_0 | address | undefined |
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 |
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Name | Type | Description |
---|
newOwner | address | undefined |
function votingPeriod() external view returns (uint32)
Name | Type | Description |
---|
_0 | uint32 | undefined |
event Approval(address indexed owner, address indexed spender, uint256 amount)
Name | Type | Description |
---|
owner indexed | address | undefined |
spender indexed | address | undefined |
amount | uint256 | undefined |
event AvatarSet(address indexed previousAvatar, address indexed newAvatar)
Name | Type | Description |
---|
previousAvatar indexed | address | undefined |
newAvatar indexed | address | undefined |
event CancelProposal(uint256 indexed proposal)
Name | Type | Description |
---|
proposal indexed | uint256 | undefined |
event ChangedGuard(address guard)
Name | Type | Description |
---|
guard | address | undefined |
event GovernanceConfigSet(uint32 voting, uint32 grace, uint256 newOffering, uint256 quorum, uint256 sponsor, uint256 minRetention)
Name | Type | Description |
---|
voting | uint32 | undefined |
grace | uint32 | undefined |
newOffering | uint256 | undefined |
quorum | uint256 | undefined |
sponsor | uint256 | undefined |
minRetention | uint256 | undefined |
event Initialized(uint8 version)
Name | Type | Description |
---|
version | uint8 | undefined |
event LootPaused(bool paused)
Name | Type | Description |
---|
paused | bool | undefined |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Name | Type | Description |
---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
event ProcessProposal(uint256 indexed proposal, bool passed, bool actionFailed)
Name | Type | Description |
---|
proposal indexed | uint256 | undefined |
passed | bool | undefined |
actionFailed | bool | undefined |
event Ragequit(address indexed member, address to, uint256 indexed lootToBurn, uint256 indexed sharesToBurn, address[] tokens)
Name | Type | Description |
---|
member indexed | address | undefined |
to | address | undefined |
lootToBurn indexed | uint256 | undefined |
sharesToBurn indexed | uint256 | undefined |
tokens | address[] | undefined |
event SetupComplete(bool lootPaused, bool sharesPaused, uint32 gracePeriod, uint32 votingPeriod, uint256 proposalOffering, uint256 quorumPercent, uint256 sponsorThreshold, uint256 minRetentionPercent, string name, string symbol, uint256 totalShares, uint256 totalLoot)
Name | Type | Description |
---|
lootPaused | bool | undefined |
sharesPaused | bool | undefined |
gracePeriod | uint32 | undefined |
votingPeriod | uint32 | undefined |
proposalOffering | uint256 | undefined |
quorumPercent | uint256 | undefined |
sponsorThreshold | uint256 | undefined |
minRetentionPercent | uint256 | undefined |
name | string | undefined |
symbol | string | undefined |
totalShares | uint256 | undefined |
totalLoot | uint256 | undefined |
event ShamanSet(address indexed shaman, uint256 permission)
Name | Type | Description |
---|
shaman indexed | address | undefined |
permission | uint256 | undefined |
event SharesPaused(bool paused)
Name | Type | Description |
---|
paused | bool | undefined |
event SponsorProposal(address indexed member, uint256 indexed proposal, uint256 indexed votingStarts)
Name | Type | Description |
---|
member indexed | address | undefined |
proposal indexed | uint256 | undefined |
votingStarts indexed | uint256 | undefined |
event SubmitProposal(uint256 indexed proposal, bytes32 indexed proposalDataHash, uint256 votingPeriod, bytes proposalData, uint256 expiration, uint256 baalGas, bool selfSponsor, uint256 timestamp, string details)
Name | Type | Description |
---|
proposal indexed | uint256 | undefined |
proposalDataHash indexed | bytes32 | undefined |
votingPeriod | uint256 | undefined |
proposalData | bytes | undefined |
expiration | uint256 | undefined |
baalGas | uint256 | undefined |
selfSponsor | bool | undefined |
timestamp | uint256 | undefined |
details | string | undefined |
event SubmitVote(address indexed member, uint256 balance, uint256 indexed proposal, bool indexed approved)
Name | Type | Description |
---|
member indexed | address | undefined |
balance | uint256 | undefined |
proposal indexed | uint256 | undefined |
approved indexed | bool | undefined |
event TargetSet(address indexed previousTarget, address indexed newTarget)
Name | Type | Description |
---|
previousTarget indexed | address | undefined |
newTarget indexed | address | undefined |
error NotIERC165Compliant(address guard_)
guard_
does not implement IERC165.
Name | Type | Description |
---|
guard_ | address | undefined |