Skip to main content

MINTRv1

Wrapper for minting and burning functions of OHM token.

Methods

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.

activate

function activate() external nonpayable

Re-activate minting and burning after shutdown.

active

function active() external view returns (bool)

Status of the minter. If false, minting and burning OHM is disabled.

Returns

NameTypeDescription
_0boolundefined

burnOhm

function burnOhm(address from_, uint256 amount_) external nonpayable

Burn OHM from an address. Must have approval.

Parameters

NameTypeDescription
from_addressundefined
amount_uint256undefined

changeKernel

function changeKernel(contract Kernel newKernel_) external nonpayable

Function used by kernel when migrating to a new kernel.

Parameters

NameTypeDescription
newKernel_contract Kernelundefined

deactivate

function deactivate() external nonpayable

Emergency shutdown of minting and burning.

decreaseMintApproval

function decreaseMintApproval(address policy_, uint256 amount_) external nonpayable

Decrease approval for specific withdrawer addresses

Parameters

NameTypeDescription
policy_addressundefined
amount_uint256undefined

increaseMintApproval

function increaseMintApproval(address policy_, uint256 amount_) external nonpayable

Increase approval for specific withdrawer addresses

Policies must explicity request how much they want approved before withdrawing.

Parameters

NameTypeDescription
policy_addressundefined
amount_uint256undefined

kernel

function kernel() external view returns (contract Kernel)

Returns

NameTypeDescription
_0contract Kernelundefined

mintApproval

function mintApproval(address) external view returns (uint256)

Mapping of who is approved for minting.

minter -> amount. Infinite approval is max(uint256).

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

mintOhm

function mintOhm(address to_, uint256 amount_) external nonpayable

Mint OHM to an address.

Parameters

NameTypeDescription
to_addressundefined
amount_uint256undefined

ohm

function ohm() external view returns (contract OlympusERC20Token)

Returns

NameTypeDescription
_0contract OlympusERC20Tokenundefined

Events

Burn

event Burn(address indexed policy_, address indexed from_, uint256 amount_)

Parameters

NameTypeDescription
policy_ indexedaddressundefined
from_ indexedaddressundefined
amount_uint256undefined

DecreaseMintApproval

event DecreaseMintApproval(address indexed policy_, uint256 newAmount_)

Parameters

NameTypeDescription
policy_ indexedaddressundefined
newAmount_uint256undefined

IncreaseMintApproval

event IncreaseMintApproval(address indexed policy_, uint256 newAmount_)

Parameters

NameTypeDescription
policy_ indexedaddressundefined
newAmount_uint256undefined

Mint

event Mint(address indexed policy_, address indexed to_, uint256 amount_)

Parameters

NameTypeDescription
policy_ indexedaddressundefined
to_ indexedaddressundefined
amount_uint256undefined

Errors

KernelAdapter_OnlyKernel

error KernelAdapter_OnlyKernel(address caller_)

Parameters

NameTypeDescription
caller_addressundefined

MINTR_NotActive

error MINTR_NotActive()

MINTR_NotApproved

error MINTR_NotApproved()

MINTR_ZeroAmount

error MINTR_ZeroAmount()

Module_PolicyNotPermitted

error Module_PolicyNotPermitted(address policy_)

Parameters

NameTypeDescription
policy_addressundefined