Asset
Functions
getSelfBalance
Returns the amount of the asset held by this contract.
Parameters
Name | Type | Description |
---|---|---|
|
| The asset to check. |
transferTo
Sends amount
of the given asset to recipient
.
Parameters
Name | Type | Description |
---|---|---|
|
| The asset to send. |
|
| The asset recipient. |
|
| The amount of the asset to send. |
transferETH
Sends amount
of ETH to recipient
.
Parameters
Name | Type | Description |
---|---|---|
|
| The asset recipient. |
|
| The amount of ETH to send. |
toWei
Converts an amount of Gwei to Wei.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount in Gwei to convert. |
toGwei
Converts an amount of Wei to Gwei.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount in Wei to convert. |
reducePrecisionToGwei
Reduces the precision of the given amount to the nearest Gwei.
Parameters
Name | Type | Description |
---|---|---|
|
| The amount whose precision is to be reduced. |
Errors
ETH_TRANSFER_FAILED
Thrown when an ETH transfer fails.
Last updated