native(to, amount)
Transfers the native token from the signer to a target address.Parameter | Type | EVM | Substrate | Description |
---|---|---|---|---|
to | str | Required | Required | The recipient address (either SS58 or EVM H160). |
amount | int | float | str | Decimal | Required | Required | Human-readable token amount (e.g., 1.5). |
Native Token Transfer Code Examples
erc20(erc_20_address, recipient_address, amount, token_decimals)
Transfers ERC-20 tokens from the signer to a recipient address.Parameter | Type | EVM | Substrate | Description |
---|---|---|---|---|
erc_20_address | str | Required | N/A | The address of the ERC-20 contract. |
recipient_address | str | Required | N/A | The recipient’s address. |
amount | int | float | str | Decimal | Required | N/A | Human-readable token amount. |
token_decimals | int | float | str | Decimal | Optional | N/A | Number of decimals for the token (defaults to 18). |
ERC-20 Transfer Code Examples
erc721(erc_721_address, recipient_address, token_id)
Transfers an ERC-721 token (NFT) from the signer to a recipient address using thesafeTransferFrom
method.
Parameter | Type | EVM | Substrate | Description |
---|---|---|---|---|
erc_721_address | str | Required | N/A | The address of the ERC-721 contract. |
recipient_address | str | Required | N/A | The recipient’s address. |
token_id | int | Required | N/A | The ID of the token to transfer. |