Skip to main content

IMachineShareOracle

Git Source

Functions

initialize

Initializer of the contract.

function initialize(address _shareOwner, uint8 _decimals) external;

Parameters

NameTypeDescription
_shareOwneraddressThe current owner contract of the share (machine or pre-deposit vault).
_decimalsuint8Decimals to use for the oracle price.

decimals

Decimals of the oracle.

function decimals() external view returns (uint8);

description

Description of the oracle.

function description() external view returns (string memory);

shareOwner

Address of the share owner (machine or pre-deposit vault).

function shareOwner() external view returns (address);

getSharePrice

Returns the price of one machine share token expressed in machine accounting tokens

The price is expressed with decimals precision.

function getSharePrice() external view returns (uint256 sharePrice);

Returns

NameTypeDescription
sharePriceuint256The price of one machine share token expressed in machine accounting tokens, scaled to decimals precision.

notifyPdvMigration

Notifies the migration of the original share owner from a pre-deposit vault to a machine.

Can only be called once and only if the share owner was initially a pre-deposit vault.

This function can be call permissionlessly and allows to optimize gas costs for users of the oracle.

function notifyPdvMigration() external;

Events

ShareOwnerMigrated

event ShareOwnerMigrated(address indexed oldShareOwner, address indexed newShareOwner);

Errors

InvalidShareOwner

error InvalidShareOwner();