Skip to main content

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

NameTypeDescription
_0bytes32undefined

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

NameTypeDescription
_0Keycodeundefined

VERSION

function VERSION() external pure returns (uint8 major, uint8 minor)

Returns which semantic version of a module is being implemented.

Returns

NameTypeDescription
majoruint8- Major version upgrade indicates breaking change to the interface.
minoruint8- Minor version change retains backward-compatible interface.

allowance

function allowance(address, address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined

Returns

NameTypeDescription
_0uint256undefined

approve

function approve(address spender, uint256 amount) external nonpayable returns (bool)

Parameters

NameTypeDescription
spenderaddressundefined
amountuint256undefined

Returns

NameTypeDescription
_0boolundefined

asset

function asset() external view returns (contract ERC20)

Returns

NameTypeDescription
_0contract ERC20undefined

balanceOf

function balanceOf(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

changeKernel

function changeKernel(contract Kernel newKernel_) external nonpayable

Function used by kernel when migrating to a new kernel.

Parameters

NameTypeDescription
newKernel_contract Kernelundefined

convertToAssets

function convertToAssets(uint256 shares) external view returns (uint256)

Parameters

NameTypeDescription
sharesuint256undefined

Returns

NameTypeDescription
_0uint256undefined

convertToShares

function convertToShares(uint256 assets) external view returns (uint256)

Parameters

NameTypeDescription
assetsuint256undefined

Returns

NameTypeDescription
_0uint256undefined

decimals

function decimals() external view returns (uint8)

Returns

NameTypeDescription
_0uint8undefined

deposit

function deposit(uint256 assets_, address receiver_) external nonpayable returns (uint256)

Parameters

NameTypeDescription
assets_uint256undefined
receiver_addressundefined

Returns

NameTypeDescription
_0uint256undefined

gOHM

function gOHM() external view returns (contract ERC20)

Returns

NameTypeDescription
_0contract ERC20undefined

kernel

function kernel() external view returns (contract Kernel)

Returns

NameTypeDescription
_0contract Kernelundefined

lastActionTimestamp

function lastActionTimestamp(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

lastDepositTimestamp

function lastDepositTimestamp(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

maxDeposit

function maxDeposit(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

maxMint

function maxMint(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

maxRedeem

function maxRedeem(address owner) external view returns (uint256)

Parameters

NameTypeDescription
owneraddressundefined

Returns

NameTypeDescription
_0uint256undefined

maxWithdraw

function maxWithdraw(address owner) external view returns (uint256)

Parameters

NameTypeDescription
owneraddressundefined

Returns

NameTypeDescription
_0uint256undefined

mint

function mint(uint256 shares_, address receiver_) external nonpayable returns (uint256)

Parameters

NameTypeDescription
shares_uint256undefined
receiver_addressundefined

Returns

NameTypeDescription
_0uint256undefined

name

function name() external view returns (string)

Returns

NameTypeDescription
_0stringundefined

nonces

function nonces(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

permit

function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable

Parameters

NameTypeDescription
owneraddressundefined
spenderaddressundefined
valueuint256undefined
deadlineuint256undefined
vuint8undefined
rbytes32undefined
sbytes32undefined

previewDeposit

function previewDeposit(uint256 assets) external view returns (uint256)

Parameters

NameTypeDescription
assetsuint256undefined

Returns

NameTypeDescription
_0uint256undefined

previewMint

function previewMint(uint256 shares) external view returns (uint256)

Parameters

NameTypeDescription
sharesuint256undefined

Returns

NameTypeDescription
_0uint256undefined

previewRedeem

function previewRedeem(uint256 shares) external view returns (uint256)

Parameters

NameTypeDescription
sharesuint256undefined

Returns

NameTypeDescription
_0uint256undefined

previewWithdraw

function previewWithdraw(uint256 assets) external view returns (uint256)

Parameters

NameTypeDescription
assetsuint256undefined

Returns

NameTypeDescription
_0uint256undefined

redeem

function redeem(uint256 shares_, address receiver_, address owner_) external nonpayable returns (uint256)

Parameters

NameTypeDescription
shares_uint256undefined
receiver_addressundefined
owner_addressundefined

Returns

NameTypeDescription
_0uint256undefined

resetActionTimestamp

function resetActionTimestamp(address _wallet) external nonpayable

Parameters

NameTypeDescription
_walletaddressundefined

symbol

function symbol() external view returns (string)

Returns

NameTypeDescription
_0stringundefined

totalAssets

function totalAssets() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

totalSupply

function totalSupply() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

transfer

function transfer(address to_, uint256 amt_) external nonpayable returns (bool)

Transfers are locked for this token.

Parameters

NameTypeDescription
to_addressundefined
amt_uint256undefined

Returns

NameTypeDescription
_0boolundefined

transferFrom

function transferFrom(address from_, address to_, uint256 amount_) external nonpayable returns (bool)

TransferFrom is only allowed by permissioned policies.

Parameters

NameTypeDescription
from_addressundefined
to_addressundefined
amount_uint256undefined

Returns

NameTypeDescription
_0boolundefined

withdraw

function withdraw(uint256 assets_, address receiver_, address owner_) external nonpayable returns (uint256)

Parameters

NameTypeDescription
assets_uint256undefined
receiver_addressundefined
owner_addressundefined

Returns

NameTypeDescription
_0uint256undefined

Events

Approval

event Approval(address indexed owner, address indexed spender, uint256 amount)

Parameters

NameTypeDescription
owner indexedaddressundefined
spender indexedaddressundefined
amountuint256undefined

Deposit

event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares)

Parameters

NameTypeDescription
caller indexedaddressundefined
owner indexedaddressundefined
assetsuint256undefined
sharesuint256undefined

Transfer

event Transfer(address indexed from, address indexed to, uint256 amount)

Parameters

NameTypeDescription
from indexedaddressundefined
to indexedaddressundefined
amountuint256undefined

Withdraw

event Withdraw(address indexed caller, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)

Parameters

NameTypeDescription
caller indexedaddressundefined
receiver indexedaddressundefined
owner indexedaddressundefined
assetsuint256undefined
sharesuint256undefined

Errors

KernelAdapter_OnlyKernel

error KernelAdapter_OnlyKernel(address caller_)

Parameters

NameTypeDescription
caller_addressundefined

Module_PolicyNotPermitted

error Module_PolicyNotPermitted(address policy_)

Parameters

NameTypeDescription
policy_addressundefined