Currently, you can call arbitrary smart contract methods by utilizing the data field in an Ethereum wallet transaction call.



Content-Type: application/json

  "to": "0xc32ae45504ee9482db99cfa21066a59e877bc0e6",
  "amount": "0",
  "data": "0x40c10f1900000000000000000000000076f0ce0ee55bf1aae0adf85a2cd348b8dd3583760000000000000000000000000000000000000000000000000de0b6b3a7640000"


The same call via the Javascript SDK:

const { hash } = await api.wallet(wallet).eth().send({
    to: "0xc32ae45504ee9482db99cfa21066a59e877bc0e6",
    amount: "0",
    data: "0x40c10f1900000000000000000000000076f0ce0ee55bf1aae0adf85a2cd348b8dd3583760000000000000000000000000000000000000000000000000de0b6b3a7640000" // mint 1 token to 0x76f0ce0ee55bf1aae0adf85a2cd348b8dd358376

Here I'm executing the mint method on the 0xc32ae45504ee9482db99cfa21066a59e877bc0e6 token using the following arguments: to=0x76f0ce0ee55bf1aae0adf85a2cd348b8dd358376, amount=1000000000000000000.

You can verify the input data on this exact transaction on etherscan:

To build a valid data string, it is required to know the ABI interface of the target smart contract method. Then you could e.g. use the web3 library to construct the desired payload:

const Web3 = require("web3");
const abi = {
    name: 'mint',
    type: 'function',
    "inputs": [
            "name": "_to",
            "type": "address"
            "name": "_amount",
            "type": "uint256"

const data = new Web3().eth.abi.encodeFunctionCall(abi, ["0x76f0ce0ee55bf1aae0adf85a2cd348b8dd358376", "1000000000000000000"]);

// 0x40c10f1900000000000000000000000076f0ce0ee55bf1aae0adf85a2cd348b8dd3583760000000000000000000000000000000000000000000000000de0b6b3a7640000

We are also working on a new, improved interface for smart contract interactions and will introduce it shortly.