Core
Volt Protocol
Source of truth for VOLT Protocol
maintains roles, access control, Volt, Vcon, and the Vcon treasury
Methods
BURNER_ROLE
function BURNER_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
DEFAULT_ADMIN_ROLE
function DEFAULT_ADMIN_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
GOVERN_ROLE
function GOVERN_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
GUARDIAN_ROLE
function GUARDIAN_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
MINTER_ROLE
function MINTER_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
PCV_CONTROLLER_ROLE
function PCV_CONTROLLER_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
createRole
function createRole(bytes32 role, bytes32 adminRole) external nonpayable
creates a new role to be maintained
can also be used to update admin of existing role
Parameters
Name | Type | Description |
---|
role | bytes32 | the new role id |
adminRole | bytes32 | the admin role id for role |
getRoleAdmin
function getRoleAdmin(bytes32 role) external view returns (bytes32)
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
Returns
Name | Type | Description |
---|
_0 | bytes32 | undefined |
getRoleMember
function getRoleMember(bytes32 role, uint256 index) external view returns (address)
Returns one of the accounts that have role
. index
must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
index | uint256 | undefined |
Returns
Name | Type | Description |
---|
_0 | address | undefined |
getRoleMemberCount
function getRoleMemberCount(bytes32 role) external view returns (uint256)
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
grantBurner
function grantBurner(address burner) external nonpayable
grants burner role to address
Parameters
Name | Type | Description |
---|
burner | address | new burner |
grantGovernor
function grantGovernor(address governor) external nonpayable
grants governor role to address
Parameters
Name | Type | Description |
---|
governor | address | new governor |
grantGuardian
function grantGuardian(address guardian) external nonpayable
grants guardian role to address
Parameters
Name | Type | Description |
---|
guardian | address | new guardian |
grantMinter
function grantMinter(address minter) external nonpayable
grants minter role to address
Parameters
Name | Type | Description |
---|
minter | address | new minter |
grantPCVController
function grantPCVController(address pcvController) external nonpayable
grants controller role to address
Parameters
Name | Type | Description |
---|
pcvController | address | new controller |
grantRole
function grantRole(bytes32 role, address account) external 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.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
account | address | undefined |
hasRole
function hasRole(bytes32 role, address account) external view returns (bool)
Returns true
if account
has been granted role
.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
account | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
init
function init() external nonpayable
isBurner
function isBurner(address _address) external view returns (bool)
checks if address is a burner
Parameters
Name | Type | Description |
---|
_address | address | address to check |
Returns
Name | Type | Description |
---|
_0 | bool | true _address is a burner |
isGovernor
function isGovernor(address _address) external view returns (bool)
checks if address is a governor
Parameters
Name | Type | Description |
---|
_address | address | address to check |
Returns
Name | Type | Description |
---|
_0 | bool | true _address is a governor |
isGuardian
function isGuardian(address _address) external view returns (bool)
checks if address is a guardian
Parameters
Name | Type | Description |
---|
_address | address | address to check |
Returns
Name | Type | Description |
---|
_0 | bool | true _address is a guardian |
isMinter
function isMinter(address _address) external view returns (bool)
checks if address is a minter
Parameters
Name | Type | Description |
---|
_address | address | address to check |
Returns
Name | Type | Description |
---|
_0 | bool | true _address is a minter |
isPCVController
function isPCVController(address _address) external view returns (bool)
checks if address is a controller
Parameters
Name | Type | Description |
---|
_address | address | address to check |
Returns
Name | Type | Description |
---|
_0 | bool | true _address is a controller |
renounceRole
function renounceRole(bytes32 role, address account) external 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
.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
account | address | undefined |
revokeBurner
function revokeBurner(address burner) external nonpayable
revokes burner role from address
Parameters
Name | Type | Description |
---|
burner | address | ex burner |
revokeGovernor
function revokeGovernor(address governor) external nonpayable
revokes governor role from address
Parameters
Name | Type | Description |
---|
governor | address | ex governor |
revokeGuardian
function revokeGuardian(address guardian) external nonpayable
revokes guardian role from address
Parameters
Name | Type | Description |
---|
guardian | address | ex guardian |
revokeMinter
function revokeMinter(address minter) external nonpayable
revokes minter role from address
Parameters
Name | Type | Description |
---|
minter | address | ex minter |
revokeOverride
function revokeOverride(bytes32 role, address account) external nonpayable
revokes a role from address
Parameters
Name | Type | Description |
---|
role | bytes32 | the role to revoke |
account | address | the address to revoke the role from |
revokePCVController
function revokePCVController(address pcvController) external nonpayable
revokes pcvController role from address
Parameters
Name | Type | Description |
---|
pcvController | address | ex pcvController |
revokeRole
function revokeRole(bytes32 role, address account) external nonpayable
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Parameters
Name | Type | Description |
---|
role | bytes32 | undefined |
account | address | undefined |
setVcon
function setVcon(contract IERC20 _vcon) external nonpayable
governor only function to set the VCON token
Parameters
Name | Type | Description |
---|
_vcon | contract IERC20 | undefined |
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
See {IERC165-supportsInterface}.
Parameters
Name | Type | Description |
---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
vcon
function vcon() external view returns (contract IERC20)
the address of the Vcon contract
Returns
Name | Type | Description |
---|
_0 | contract IERC20 | undefined |
volt
function volt() external view returns (contract IVolt)
the address of the FEI contract
Returns
Name | Type | Description |
---|
_0 | contract IVolt | undefined |
Events
Initialized
event Initialized(uint8 version)
Parameters
Name | Type | Description |
---|
version | uint8 | undefined |
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
Parameters
Name | Type | Description |
---|
role indexed | bytes32 | undefined |
previousAdminRole indexed | bytes32 | undefined |
newAdminRole indexed | bytes32 | undefined |
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
Parameters
Name | Type | Description |
---|
role indexed | bytes32 | undefined |
account indexed | address | undefined |
sender indexed | address | undefined |
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
Parameters
Name | Type | Description |
---|
role indexed | bytes32 | undefined |
account indexed | address | undefined |
sender indexed | address | undefined |
VconUpdate
event VconUpdate(contract IERC20 indexed _vcon)
Parameters
Name | Type | Description |
---|
_vcon indexed | contract IERC20 | undefined |
VoltUpdate
event VoltUpdate(contract IERC20 indexed _volt)
Parameters
Name | Type | Description |
---|
_volt indexed | contract IERC20 | undefined |