Asset

Git Source

Functions

getSelfBalance

Returns the amount of the asset held by this contract.

function getSelfBalance(address asset) internal view returns (uint256);

Parameters

NameTypeDescription

asset

address

The asset to check.

transferTo

Sends amount of the given asset to recipient.

function transferTo(address asset, address recipient, uint256 amount) internal;

Parameters

NameTypeDescription

asset

address

The asset to send.

recipient

address

The asset recipient.

amount

uint256

The amount of the asset to send.

transferETH

Sends amount of ETH to recipient.

function transferETH(address recipient, uint256 amount) internal;

Parameters

NameTypeDescription

recipient

address

The asset recipient.

amount

uint256

The amount of ETH to send.

toWei

Converts an amount of Gwei to Wei.

function toWei(uint256 amountGwei) internal pure returns (uint256);

Parameters

NameTypeDescription

amountGwei

uint256

The amount in Gwei to convert.

toGwei

Converts an amount of Wei to Gwei.

function toGwei(uint256 amountWei) internal pure returns (uint64);

Parameters

NameTypeDescription

amountWei

uint256

The amount in Wei to convert.

reducePrecisionToGwei

Reduces the precision of the given amount to the nearest Gwei.

function reducePrecisionToGwei(uint256 amountWei) internal pure returns (uint256);

Parameters

NameTypeDescription

amountWei

uint256

The amount whose precision is to be reduced.

Errors

ETH_TRANSFER_FAILED

Thrown when an ETH transfer fails.

error ETH_TRANSFER_FAILED();

Last updated