OlympusVotes
Votes module is the ERC20 token that represents voting power in the network.
Methods
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view returns (bytes32)
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
INIT
function INIT() external nonpayable
Initialization function for the module
This function is called when the module is installed or upgraded by the kernel.MUST BE GATED BY onlyKernel. Used to encompass any initialization or upgrade logic.
KEYCODE
function KEYCODE() external pure returns (Keycode)
5 byte identifier for a module.
Returns
Name | Type | Description |
---|---|---|
_0 | Keycode | undefined |
VERSION
function VERSION() external pure returns (uint8 major, uint8 minor)
Returns which semantic version of a module is being implemented.
Returns
Name | Type | Description |
---|---|---|
major | uint8 | - Major version upgrade indicates breaking change to the interface. |
minor | uint8 | - Minor version change retains backward-compatible interface. |
allowance
function allowance(address, address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
_1 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
approve
function approve(address spender, uint256 amount) external nonpayable returns (bool)
Parameters
Name | Type | Description |
---|---|---|
spender | address | undefined |
amount | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
asset
function asset() external view returns (contract ERC20)
Returns
Name | Type | Description |
---|---|---|
_0 | contract ERC20 | undefined |
balanceOf
function balanceOf(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
changeKernel
function changeKernel(contract Kernel newKernel_) external nonpayable
Function used by kernel when migrating to a new kernel.
Parameters
Name | Type | Description |
---|---|---|
newKernel_ | contract Kernel | undefined |
convertToAssets
function convertToAssets(uint256 shares) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
convertToShares
function convertToShares(uint256 assets) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
assets | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
decimals
function decimals() external view returns (uint8)
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
deposit
function deposit(uint256 assets_, address receiver_) external nonpayable returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
assets_ | uint256 | undefined |
receiver_ | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
gOHM
function gOHM() external view returns (contract ERC20)
Returns
Name | Type | Description |
---|---|---|
_0 | contract ERC20 | undefined |
kernel
function kernel() external view returns (contract Kernel)
Returns
Name | Type | Description |
---|---|---|
_0 | contract Kernel | undefined |
lastActionTimestamp
function lastActionTimestamp(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
lastDepositTimestamp
function lastDepositTimestamp(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
maxDeposit
function maxDeposit(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
maxMint
function maxMint(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
maxRedeem
function maxRedeem(address owner) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
owner | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
maxWithdraw
function maxWithdraw(address owner) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
owner | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
mint
function mint(uint256 shares_, address receiver_) external nonpayable returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
shares_ | uint256 | undefined |
receiver_ | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
name
function name() external view returns (string)
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
nonces
function nonces(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
permit
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
owner | address | undefined |
spender | address | undefined |
value | uint256 | undefined |
deadline | uint256 | undefined |
v | uint8 | undefined |
r | bytes32 | undefined |
s | bytes32 | undefined |
previewDeposit
function previewDeposit(uint256 assets) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
assets | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
previewMint
function previewMint(uint256 shares) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
previewRedeem
function previewRedeem(uint256 shares) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
previewWithdraw
function previewWithdraw(uint256 assets) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
assets | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
redeem
function redeem(uint256 shares_, address receiver_, address owner_) external nonpayable returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
shares_ | uint256 | undefined |
receiver_ | address | undefined |
owner_ | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
resetActionTimestamp
function resetActionTimestamp(address _wallet) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_wallet | address | undefined |
symbol
function symbol() external view returns (string)
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
totalAssets
function totalAssets() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
totalSupply
function totalSupply() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
transfer
function transfer(address to_, uint256 amt_) external nonpayable returns (bool)
Transfers are locked for this token.
Parameters
Name | Type | Description |
---|---|---|
to_ | address | undefined |
amt_ | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
transferFrom
function transferFrom(address from_, address to_, uint256 amount_) external nonpayable returns (bool)
TransferFrom is only allowed by permissioned policies.
Parameters
Name | Type | Description |
---|---|---|
from_ | address | undefined |
to_ | address | undefined |
amount_ | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
withdraw
function withdraw(uint256 assets_, address receiver_, address owner_) external nonpayable returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
assets_ | uint256 | undefined |
receiver_ | address | undefined |
owner_ | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Events
Approval
event Approval(address indexed owner, address indexed spender, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
owner indexed | address | undefined |
spender indexed | address | undefined |
amount | uint256 | undefined |
Deposit
event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares)
Parameters
Name | Type | Description |
---|---|---|
caller indexed | address | undefined |
owner indexed | address | undefined |
assets | uint256 | undefined |
shares | uint256 | undefined |
Transfer
event Transfer(address indexed from, address indexed to, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
from indexed | address | undefined |
to indexed | address | undefined |
amount | uint256 | undefined |
Withdraw
event Withdraw(address indexed caller, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)
Parameters
Name | Type | Description |
---|---|---|
caller indexed | address | undefined |
receiver indexed | address | undefined |
owner indexed | address | undefined |
assets | uint256 | undefined |
shares | uint256 | undefined |
Errors
KernelAdapter_OnlyKernel
error KernelAdapter_OnlyKernel(address caller_)
Parameters
Name | Type | Description |
---|---|---|
caller_ | address | undefined |
Module_PolicyNotPermitted
error Module_PolicyNotPermitted(address policy_)
Parameters
Name | Type | Description |
---|---|---|
policy_ | address | undefined |