Skip to main content

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

NameTypeDescription
_0bytes32undefined

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

GOVERN_ROLE

function GOVERN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

GUARDIAN_ROLE

function GUARDIAN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

MINTER_ROLE

function MINTER_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

PCV_CONTROLLER_ROLE

function PCV_CONTROLLER_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

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

NameTypeDescription
rolebytes32the new role id
adminRolebytes32the 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

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0bytes32undefined

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

NameTypeDescription
rolebytes32undefined
indexuint256undefined

Returns

NameTypeDescription
_0addressundefined

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

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0uint256undefined

grantBurner

function grantBurner(address burner) external nonpayable

grants burner role to address

Parameters

NameTypeDescription
burneraddressnew burner

grantGovernor

function grantGovernor(address governor) external nonpayable

grants governor role to address

Parameters

NameTypeDescription
governoraddressnew governor

grantGuardian

function grantGuardian(address guardian) external nonpayable

grants guardian role to address

Parameters

NameTypeDescription
guardianaddressnew guardian

grantMinter

function grantMinter(address minter) external nonpayable

grants minter role to address

Parameters

NameTypeDescription
minteraddressnew minter

grantPCVController

function grantPCVController(address pcvController) external nonpayable

grants controller role to address

Parameters

NameTypeDescription
pcvControlleraddressnew 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

NameTypeDescription
rolebytes32undefined
accountaddressundefined

hasRole

function hasRole(bytes32 role, address account) external view returns (bool)

Returns true if account has been granted role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

Returns

NameTypeDescription
_0boolundefined

init

function init() external nonpayable

isBurner

function isBurner(address _address) external view returns (bool)

checks if address is a burner

Parameters

NameTypeDescription
_addressaddressaddress to check

Returns

NameTypeDescription
_0booltrue _address is a burner

isGovernor

function isGovernor(address _address) external view returns (bool)

checks if address is a governor

Parameters

NameTypeDescription
_addressaddressaddress to check

Returns

NameTypeDescription
_0booltrue _address is a governor

isGuardian

function isGuardian(address _address) external view returns (bool)

checks if address is a guardian

Parameters

NameTypeDescription
_addressaddressaddress to check

Returns

NameTypeDescription
_0booltrue _address is a guardian

isMinter

function isMinter(address _address) external view returns (bool)

checks if address is a minter

Parameters

NameTypeDescription
_addressaddressaddress to check

Returns

NameTypeDescription
_0booltrue _address is a minter

isPCVController

function isPCVController(address _address) external view returns (bool)

checks if address is a controller

Parameters

NameTypeDescription
_addressaddressaddress to check

Returns

NameTypeDescription
_0booltrue _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

NameTypeDescription
rolebytes32undefined
accountaddressundefined

revokeBurner

function revokeBurner(address burner) external nonpayable

revokes burner role from address

Parameters

NameTypeDescription
burneraddressex burner

revokeGovernor

function revokeGovernor(address governor) external nonpayable

revokes governor role from address

Parameters

NameTypeDescription
governoraddressex governor

revokeGuardian

function revokeGuardian(address guardian) external nonpayable

revokes guardian role from address

Parameters

NameTypeDescription
guardianaddressex guardian

revokeMinter

function revokeMinter(address minter) external nonpayable

revokes minter role from address

Parameters

NameTypeDescription
minteraddressex minter

revokeOverride

function revokeOverride(bytes32 role, address account) external nonpayable

revokes a role from address

Parameters

NameTypeDescription
rolebytes32the role to revoke
accountaddressthe address to revoke the role from

revokePCVController

function revokePCVController(address pcvController) external nonpayable

revokes pcvController role from address

Parameters

NameTypeDescription
pcvControlleraddressex 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

NameTypeDescription
rolebytes32undefined
accountaddressundefined

setVcon

function setVcon(contract IERC20 _vcon) external nonpayable

governor only function to set the VCON token

Parameters

NameTypeDescription
_vconcontract IERC20undefined

supportsInterface

function supportsInterface(bytes4 interfaceId) external view returns (bool)

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

vcon

function vcon() external view returns (contract IERC20)

the address of the Vcon contract

Returns

NameTypeDescription
_0contract IERC20undefined

volt

function volt() external view returns (contract IVolt)

the address of the FEI contract

Returns

NameTypeDescription
_0contract IVoltundefined

Events

Initialized

event Initialized(uint8 version)

Parameters

NameTypeDescription
versionuint8undefined

RoleAdminChanged

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Parameters

NameTypeDescription
role indexedbytes32undefined
previousAdminRole indexedbytes32undefined
newAdminRole indexedbytes32undefined

RoleGranted

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

RoleRevoked

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

VconUpdate

event VconUpdate(contract IERC20 indexed _vcon)

Parameters

NameTypeDescription
_vcon indexedcontract IERC20undefined

VoltUpdate

event VoltUpdate(contract IERC20 indexed _volt)

Parameters

NameTypeDescription
_volt indexedcontract IERC20undefined