⬅️ Contracts
Mainnet implementations
Core, RewardsDistributorAdmin, TribalChiefSyncV2, Unitroller, OwnableTimedMinter, TribalChief, CollateralizationOracle, CollateralizationOracleWrapper, NamedStaticPCVDepositWrapper, IMasterOracle, VotiumBriber
Events
CallExecuted
event CallExecuted(bytes32,uint256,address,uint256,bytes)
Params
Param |
Type |
Notes |
id |
bytes32 indexed |
|
index |
uint256 indexed |
|
target |
address |
|
value |
uint256 |
|
data |
bytes |
|
CallScheduled
event CallScheduled(bytes32,uint256,address,uint256,bytes,bytes32,uint256)
Params
Param |
Type |
Notes |
id |
bytes32 indexed |
|
index |
uint256 indexed |
|
target |
address |
|
value |
uint256 |
|
data |
bytes |
|
predecessor |
bytes32 |
|
delay |
uint256 |
|
Cancelled
event Cancelled(bytes32)
Params
Param |
Type |
Notes |
id |
bytes32 indexed |
|
ContractAdminRoleUpdate
event ContractAdminRoleUpdate(bytes32,bytes32)
Params
Param |
Type |
Notes |
oldContractAdminRole |
bytes32 indexed |
|
newContractAdminRole |
bytes32 indexed |
|
CoreUpdate
event CoreUpdate(address,address)
Params
Param |
Type |
Notes |
oldCore |
address indexed |
|
newCore |
address indexed |
|
MinDelayChange
event MinDelayChange(uint256,uint256)
Params
Param |
Type |
Notes |
oldDuration |
uint256 |
|
newDuration |
uint256 |
|
Paused
event Paused(address)
Params
Param |
Type |
Notes |
account |
address |
|
RoleAdminChanged
event RoleAdminChanged(bytes32,bytes32,bytes32)
Params
Param |
Type |
Notes |
role |
bytes32 indexed |
|
previousAdminRole |
bytes32 indexed |
|
newAdminRole |
bytes32 indexed |
|
RoleGranted
event RoleGranted(bytes32,address,address)
Params
Param |
Type |
Notes |
role |
bytes32 indexed |
|
account |
address indexed |
|
sender |
address indexed |
|
RoleRevoked
event RoleRevoked(bytes32,address,address)
Params
Param |
Type |
Notes |
role |
bytes32 indexed |
|
account |
address indexed |
|
sender |
address indexed |
|
Unpaused
event Unpaused(address)
Params
Param |
Type |
Notes |
account |
address |
|
Methods
CONTRACT_ADMIN_ROLE
function CONTRACT_ADMIN_ROLE() view returns(bytes32)
a role used with a subset of governor permissions for this contract only
Returns
DEFAULT_ADMIN_ROLE
function DEFAULT_ADMIN_ROLE() view returns(bytes32)
Returns
EXECUTOR_ROLE
function EXECUTOR_ROLE() view returns(bytes32)
Returns
PROPOSER_ROLE
function PROPOSER_ROLE() view returns(bytes32)
Returns
TIMELOCK_ADMIN_ROLE
function TIMELOCK_ADMIN_ROLE() view returns(bytes32)
Returns
becomeAdmin
function becomeAdmin() nonpayable
allow guardian or governor to assume timelock admin roles This more elegantly achieves optimistic timelock as follows: - veto: grant self PROPOSER_ROLE and cancel - pause proposals: revoke PROPOSER_ROLE from target - pause execution: revoke EXECUTOR_ROLE from target - set new proposer: revoke old proposer and add new one In addition it allows for much more granular and flexible access for multisig operators
cancel
function cancel(bytes32) nonpayable
Cancel an operation. Requirements: - the caller must have the 'proposer' role.
Params
Param |
Type |
Notes |
id |
bytes32 |
|
core
function core() view returns(address)
address of the Core contract referenced
Returns
Param |
Type |
Notes |
|
address |
ICore implementation address |
execute
function execute(address,uint256,bytes,bytes32,bytes32) payable
Execute an (ready) operation containing a single transaction. Emits a {CallExecuted} event. Requirements: - the caller must have the 'executor' role.
Params
Param |
Type |
Notes |
target |
address |
|
value |
uint256 |
|
data |
bytes |
|
predecessor |
bytes32 |
|
salt |
bytes32 |
|
executeBatch
function executeBatch(address[],uint256[],bytes[],bytes32,bytes32) payable
Execute an (ready) operation containing a batch of transactions. Emits one {CallExecuted} event per transaction in the batch. Requirements: - the caller must have the 'executor' role.
Params
Param |
Type |
Notes |
targets |
address[] |
|
values |
uint256[] |
|
datas |
bytes[] |
|
predecessor |
bytes32 |
|
salt |
bytes32 |
|
fei
function fei() view returns(address)
address of the Fei contract referenced by Core
Returns
Param |
Type |
Notes |
|
address |
IFei implementation address |
feiBalance
function feiBalance() view returns(uint256)
fei balance of contract
Returns
Param |
Type |
Notes |
|
uint256 |
fei amount held |
getMinDelay
function getMinDelay() view returns(uint256)
Returns the minimum delay for an operation to become valid. This value can be changed by executing an operation that calls updateDelay
.
Returns
Param |
Type |
Notes |
duration |
uint256 |
|
getRoleAdmin
function getRoleAdmin(bytes32) view returns(bytes32)
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Params
Param |
Type |
Notes |
role |
bytes32 |
|
Returns
getTimestamp
function getTimestamp(bytes32) view returns(uint256)
Returns the timestamp at with an operation becomes ready (0 for unset operations, 1 for done operations).
Params
Param |
Type |
Notes |
id |
bytes32 |
|
Returns
Param |
Type |
Notes |
timestamp |
uint256 |
|
grantRole
function grantRole(bytes32,address) nonpayable
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Params
Param |
Type |
Notes |
role |
bytes32 |
|
account |
address |
|
hasRole
function hasRole(bytes32,address) view returns(bool)
Returns true
if account
has been granted role
.
Params
Param |
Type |
Notes |
role |
bytes32 |
|
account |
address |
|
Returns
hashOperation
function hashOperation(address,uint256,bytes,bytes32,bytes32) pure returns(bytes32)
Returns the identifier of an operation containing a single transaction.
Params
Param |
Type |
Notes |
target |
address |
|
value |
uint256 |
|
data |
bytes |
|
predecessor |
bytes32 |
|
salt |
bytes32 |
|
Returns
Param |
Type |
Notes |
hash |
bytes32 |
|
hashOperationBatch
function hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32) pure returns(bytes32)
Returns the identifier of an operation containing a batch of transactions.
Params
Param |
Type |
Notes |
targets |
address[] |
|
values |
uint256[] |
|
datas |
bytes[] |
|
predecessor |
bytes32 |
|
salt |
bytes32 |
|
Returns
Param |
Type |
Notes |
hash |
bytes32 |
|
isContractAdmin
function isContractAdmin(address) view returns(bool)
returns whether a given address has the admin role for this contract
Params
Param |
Type |
Notes |
_admin |
address |
|
Returns
isOperation
function isOperation(bytes32) view returns(bool)
Returns whether an id correspond to a registered operation. This includes both Pending, Ready and Done operations.
Params
Param |
Type |
Notes |
id |
bytes32 |
|
Returns
Param |
Type |
Notes |
pending |
bool |
|
isOperationDone
function isOperationDone(bytes32) view returns(bool)
Returns whether an operation is done or not.
Params
Param |
Type |
Notes |
id |
bytes32 |
|
Returns
Param |
Type |
Notes |
done |
bool |
|
isOperationPending
function isOperationPending(bytes32) view returns(bool)
Returns whether an operation is pending or not.
Params
Param |
Type |
Notes |
id |
bytes32 |
|
Returns
Param |
Type |
Notes |
pending |
bool |
|
isOperationReady
function isOperationReady(bytes32) view returns(bool)
Returns whether an operation is ready or not.
Params
Param |
Type |
Notes |
id |
bytes32 |
|
Returns
Param |
Type |
Notes |
ready |
bool |
|
pause
function pause() nonpayable
set pausable methods to paused
paused
function paused() view returns(bool)
Returns true if the contract is paused, and false otherwise.
Returns
renounceRole
function renounceRole(bytes32,address) nonpayable
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Params
Param |
Type |
Notes |
role |
bytes32 |
|
account |
address |
|
revokeRole
function revokeRole(bytes32,address) nonpayable
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Params
Param |
Type |
Notes |
role |
bytes32 |
|
account |
address |
|
schedule
function schedule(address,uint256,bytes,bytes32,bytes32,uint256) nonpayable
Schedule an operation containing a single transaction. Emits a {CallScheduled} event. Requirements: - the caller must have the 'proposer' role.
Params
Param |
Type |
Notes |
target |
address |
|
value |
uint256 |
|
data |
bytes |
|
predecessor |
bytes32 |
|
salt |
bytes32 |
|
delay |
uint256 |
|
scheduleBatch
function scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256) nonpayable
Schedule an operation containing a batch of transactions. Emits one {CallScheduled} event per transaction in the batch. Requirements: - the caller must have the 'proposer' role.
Params
Param |
Type |
Notes |
targets |
address[] |
|
values |
uint256[] |
|
datas |
bytes[] |
|
predecessor |
bytes32 |
|
salt |
bytes32 |
|
delay |
uint256 |
|
setContractAdminRole
function setContractAdminRole(bytes32) nonpayable
sets a new admin role for this contract
Params
Param |
Type |
Notes |
newContractAdminRole |
bytes32 |
|
setCore
function setCore(address) nonpayable
set new Core reference address
Params
Param |
Type |
Notes |
newCore |
address |
the new core address |
supportsInterface
function supportsInterface(bytes4) view returns(bool)
See {IERC165-supportsInterface}.
Params
Param |
Type |
Notes |
interfaceId |
bytes4 |
|
Returns
tribe
function tribe() view returns(address)
address of the Tribe contract referenced by Core
Returns
Param |
Type |
Notes |
|
address |
IERC20 implementation address |
tribeBalance
function tribeBalance() view returns(uint256)
tribe balance of contract
Returns
Param |
Type |
Notes |
|
uint256 |
tribe amount held |
unpause
function unpause() nonpayable
set pausable methods to unpaused
updateDelay
function updateDelay(uint256) nonpayable
Changes the minimum timelock duration for future operations. Emits a {MinDelayChange} event. Requirements: - the caller must be the timelock itself. This can only be achieved by scheduling and later executing an operation where the timelock is the target and the data is the ABI-encoded call to this function.
Params
Param |
Type |
Notes |
newDelay |
uint256 |
|
⬅️ Contracts