Maple
Search…
⌃K

xMPL

Constructor

constructor(
string name_,
string symbol_,
address owner_,
address asset_,
uint256 precision_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
name_
string
string
The name of the token.
1
symbol_
string
string
The symbol of the token.
2
owner_
address
address
3
asset_
address
address
4
precision_
uint256
uint256

Functions

MINIMUM_MIGRATION_DELAY [state variable]

Get the minimum delay that a scheduled transaction needs in order to be executed.
function MINIMUM_MIGRATION_DELAY()
pure
returns (
uint256 minimumMigrationDelay_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
minimumMigrationDelay_
uint256
uint256
The delay in seconds.

PERMIT_TYPEHASH [state variable]

Returns the permit type hash.
function PERMIT_TYPEHASH()
view
returns (
bytes32 permitTypehash_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
permitTypehash_
bytes32
bytes32
The permit type hash.

DOMAIN_SEPARATOR

Returns the signature domain separator.
function DOMAIN_SEPARATOR()
view
returns (
bytes32 domainSeparator_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
domainSeparator_
bytes32
bytes32
The signature domain separator.

allowance [state variable]

Returns the allowance that one account has given another over their tokens.
function allowance(
address owner_,
address spender_
)
view
returns (
uint256 allowance_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
owner_
address
address
Account that tokens are approved from.
1
spender_
address
address
Account that tokens are approved for.

Return Values:

Index
Name
Type
Internal Type
Description
0
allowance_
uint256
uint256
Allowance that one account has given another over their tokens.

asset [state variable]

The address of the underlying asset used by the Vault. MUST be a contract that implements the ERC-20 standard. MUST NOT revert.
function asset()
view
returns (
address asset_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
asset_
address
address
The address of the underlying asset.

balanceOf [state variable]

Returns the amount of tokens owned by a given account.
function balanceOf(
address account_
)
view
returns (
uint256 balance_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
account_
address
address
Account that owns the tokens.

Return Values:

Index
Name
Type
Internal Type
Description
0
balance_
uint256
uint256
Amount of tokens owned by a given account.

decimals [state variable]

Returns the decimal precision used by the token.
function decimals()
view
returns (
uint8 decimals_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
decimals_
uint8
uint8
The decimal precision used by the token.

freeAssets [state variable]

The total amount of the underlying asset that is currently unlocked and is not time-dependent. Analogous to the y-intercept in a linear function.
function freeAssets()
view
returns (
uint256 freeAssets_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
freeAssets_
uint256
uint256

issuanceRate [state variable]

The rate of issuance of the vesting schedule that is currently active. Denominated as the amount of underlying assets vesting per second.
function issuanceRate()
view
returns (
uint256 issuanceRate_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
issuanceRate_
uint256
uint256

lastUpdated [state variable]

The timestamp of when the linear function was last recalculated. Analogous to t0 in a linear function.
function lastUpdated()
view
returns (
uint256 lastUpdated_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
lastUpdated_
uint256
uint256

name [state variable]

Returns the name of the token.
function name()
view
returns (
string name_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
name_
string
string
The name of the token.

nonces [state variable]

Returns the nonce for the given owner.
function nonces(
address owner_
)
view
returns (
uint256 nonce_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
owner_
address
address
The address of the owner account.

Return Values:

Index
Name
Type
Internal Type
Description
0
nonce_
uint256
uint256
The nonce for the given owner.

owner [state variable]

The address of the account that is allowed to update the vesting schedule.
function owner()
view
returns (
address owner_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
owner_
address
address

pendingOwner [state variable]

The next owner, nominated by the current owner.
function pendingOwner()
view
returns (
address pendingOwner_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
pendingOwner_
address
address

precision [state variable]

The precision at which the issuance rate is measured.
function precision()
view
returns (
uint256 precision_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
precision_
uint256
uint256

scheduledMigrationTimestamp [state variable]

Get the timestamp that a migration is scheduled for.
function scheduledMigrationTimestamp()
view
returns (
uint256 scheduledMigrationTimestamp_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
scheduledMigrationTimestamp_
uint256
uint256
The timestamp of the migration.

scheduledMigrator [state variable]

The address of the migrator contract to be used during the scheduled migration.
function scheduledMigrator()
view
returns (
address scheduledMigrator_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
scheduledMigrator_
address
address
The address of the migrator.

scheduledNewAsset [state variable]

The address of the new asset token to be migrated to during the scheduled migration.
function scheduledNewAsset()
view
returns (
address scheduledNewAsset_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
scheduledNewAsset_
address
address
The address of the new asset token.

symbol [state variable]

Returns the symbol of the token.
function symbol()
view
returns (
string symbol_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
symbol_
string
string
The symbol of the token.

totalSupply [state variable]

Returns the total amount of tokens in existence.
function totalSupply()
view
returns (
uint256 totalSupply_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
totalSupply_
uint256
uint256
The total amount of tokens in existence.

vestingPeriodFinish [state variable]

The end of the current vesting schedule.
function vestingPeriodFinish()
view
returns (
uint256 vestingPeriodFinish_
);

Return Values:

Index
Name
Type
Internal Type
Description
0
vestingPeriodFinish_
uint256
uint256

acceptOwnership

Sets the pending owner as the new owner. Can be called only by the pending owner, and only after their nomination by the current owner.
function acceptOwnership()
nonpayable;

approve

Function that allows one account to set the allowance of another account over their tokens. Emits an {Approval} event.
function approve(
address spender_,
uint256 amount_
)
nonpayable
returns (
bool success_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
spender_
address
address
Account that tokens are approved for.
1
amount_
uint256
uint256
Amount of tokens that have been approved.

Return Values:

Index
Name
Type
Internal Type
Description
0
success_
bool
bool
Boolean indicating whether the operation succeeded.

balanceOfAssets

Returns the amount of underlying assets owned by the specified account.
function balanceOfAssets(
address account_
)
view
returns (
uint256 assets_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
account_
address
address
Address of the account.

Return Values:

Index
Name
Type
Internal Type
Description
0
assets_
uint256
uint256
Amount of assets owned.

cancelMigration

Cancel the scheduled migration
function cancelMigration()
nonpayable;

convertToAssets

The amount of `assets_` the `shares_` are currently equivalent to. MUST NOT be inclusive of any fees that are charged against assets in the Vault. MUST NOT reflect slippage or other on-chain conditions when performing the actual exchange. MUST NOT show any variations depending on the caller. MUST NOT revert.
function convertToAssets(
uint256 shares_
)
view
returns (
uint256 assets_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
shares_
uint256
uint256
The amount of shares to convert.

Return Values:

Index
Name
Type
Internal Type
Description
0
assets_
uint256
uint256
The amount of equivalent assets.

convertToShares

The amount of `shares_` the `assets_` are currently equivalent to. MUST NOT be inclusive of any fees that are charged against assets in the Vault. MUST NOT reflect slippage or other on-chain conditions when performing the actual exchange. MUST NOT show any variations depending on the caller. MUST NOT revert.
function convertToShares(
uint256 assets_
)
view
returns (
uint256 shares_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
assets_
uint256
uint256
The amount of assets to convert.

Return Values:

Index
Name
Type
Internal Type
Description
0
shares_
uint256
uint256
The amount of equivalent shares.

decreaseAllowance

Function that allows one account to decrease the allowance of another account over their tokens. Emits an {Approval} event.
function decreaseAllowance(
address spender_,
uint256 subtractedAmount_
)
nonpayable
returns (
bool success_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
spender_
address
address
Account that tokens are approved for.
1
subtractedAmount_
uint256
uint256
Amount to decrease approval by.

Return Values:

Index
Name
Type
Internal Type
Description
0
success_
bool
bool
Boolean indicating whether the operation succeeded.

deposit

Mints `shares_` to `receiver_` by depositing `assets_` into the Vault. MUST emit the {Deposit} event. MUST revert if all of the assets cannot be deposited (due to insufficient approval, deposit limits, slippage, etc).
function deposit(
uint256 assets_,
address receiver_
)
nonpayable
returns (
uint256 shares_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
assets_
uint256
uint256
The amount of assets to deposit.
1
receiver_
address
address
The receiver of the shares.

Return Values:

Index
Name
Type
Internal Type
Description
0
shares_
uint256
uint256
The amount of shares minted.

depositWithPermit

Does a ERC4626 `deposit` with a ERC-2612 `permit`.
function depositWithPermit(
uint256 assets_,
address receiver_,
uint256 deadline_,
uint8 v_,
bytes32 r_,
bytes32 s_
)
nonpayable
returns (
uint256 shares_
);

Parameters:

Index
Name
Type
Internal Type
Description
0
assets_
uint256
uint256
The amount of `asset` to deposit.
1
receiver_
address
address
The receiver of the shares.
2
deadline_
uint256
uint256
The timestamp after which the `permit` signature is no longer valid.
3
v_
uint8
uint8
ECDSA signature v component.
4
r_
bytes32
bytes32
ECDSA signature r component.
5
s_
bytes32
bytes32
ECDSA signature s component.

Return Values:

Index
Name
Type
Internal Type
Description
0
shares_
uint256
uint256
The amount of shares minted.

increaseAllowance

Function that allows one account to increase the allowance of another account over their tokens. Emits an {Approval} event.
function increaseAllowance(
address spender_,
uint256 addedAmount_
)
nonpayable
returns (
bool success_
);