---
title: /sendTransactionToEvmContractWithContractInfo
slug: sendtransactiontoevmcontractwithcontractinfo
createdAt: 2024-01-09T12:30:00.561Z
---

{
  "id": "z0D057P3CxsvMs1Dumc85",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://1.1.1.1/sendTransactionToEvmContractWithContractInfo",
    "servers": [
      {
        "url": "http://1.1.1.1/sendTransactionToEvmContractWithContractInfo"
      }
    ],
    "name": "",
    "description": "<ul>\n<li>\n<p>This function facilitates sending a transaction to an EVM (Ethereum Virtual Machine) smart contract</p>\n</li>\n<li>\n<p>return - Dict, e.g. {\"FunctionName\":\"transfer\",\n\"ParametersFieldsTypesAndValues\":[[\"address\",\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"], [\"uint256\",\"100000000000000000\"]]}\n********** NOTE: success or failure in this api call does not necessarily means success or failure in the transaction itself.\n********** for example, the transaction may work by the response to the client can be lost in communication (if the internet is down for the client).\n********** another example is that the transaction was approved here but failed in the signing process\nTo know the status of the transaction you can access the function getTransactionByToken.\nTo get the token to send those functions you should call getCurrentToken one action BEFORE sendTransaction\nmyTokenToStoreInTheDb = user.getCurrentToken()\nsendTransactionToEvmContractWithContractInfo(...)\n.....\nuser.getTransactionByToken(myTokenToStoreInTheDb,\"ETH\")</p>\n</li>\n</ul>\n<p>example:</p>\n<ul>\n<li>ETH: sendTransactionToEvmContractWithContractInfo(1,\"0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe\",\"6000\",\"50000000000\",70000, \"transfer\",[[\"address\",\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"], [\"uint256\",\"100000000000000000\"]],True,\"false\",\"transferExample\",None,\"1000000000\",\"ETH\")</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "required",
          "name": "account_id",
          "type": "integer",
          "example": 1,
          "description": "the account to send from",
          "default": 1
        },
        {
          "kind": "required",
          "name": "contract_address",
          "type": "string",
          "example": "0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7",
          "description": "the address of the contract to send to",
          "default": "0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7"
        },
        {
          "kind": "required",
          "name": "amount",
          "type": "string",
          "example": "6000",
          "description": "<p>the amount to send with this transaction, in Wei</p>",
          "default": "6000"
        },
        {
          "kind": "required",
          "name": "gas_limit",
          "type": "integer",
          "example": 21500,
          "description": "<p>gas limit we want to transfer, in gas units - must be at least 21500</p>",
          "default": 21500
        },
        {
          "kind": "required",
          "name": "gas_price",
          "type": "integer",
          "example": 100000000000,
          "description": "<p>the gas price we want to transfer, in wei</p>",
          "default": 100000000000
        },
        {
          "kind": "required",
          "name": "function_name",
          "type": "string",
          "example": "transfer",
          "description": "<p>representing the function name to call, e.g. \"foo\" (with no params).</p>",
          "default": "transfer"
        },
        {
          "kind": "optional",
          "name": "max_priority_fee",
          "type": "string",
          "description": "<p>the max priority fee we want to tip the miner. Should be sent in EVM / ERC20 transactions that are EIP1559 type, otherwise should be None. (for more info, read <a href=\"https://metamask.io/1559/\" target=\"_blank\">https://metamask.io/1559/</a>)</p>"
        },
        {
          "kind": "optional",
          "name": "validate_transaction",
          "type": "boolean",
          "example": "False",
          "description": "<p>if this is true, the MPC wallet will access the node  to check if this transaction is\nlikely to fail by running dry-run, and will block the transaction if it is</p>",
          "default": "False"
        },
        {
          "kind": "required",
          "name": "parameters_fields_types_and_values",
          "type": "object",
          "example": "",
          "description": "list of pairs of \"type\" and value for each parameter in the function (see below)\ne.g [[\"int\",\"32432\"],[\"bytes\",\"0x1234567890\"],[\"int8[3]\",[\"-20\",\"0\",\"127\"]],[\"string\",\"got the idea, right?\"]]\n* @subparam type string representing the parameters types, e.g. [\"int32\",\"uint256\",\"string[]\",\"bool\"]\nGK8 system supports all the types supported by solidity:\n* uint<M>: unsigned integer type of M bits, 0 < M <= 256, M % 8 == 0. e.g. uint32, uint8, uint256. (uint is uint256)\n* int<M>: signed integer type of M bits, 0 < M <= 256, M % 8 == 0.  e.g. int32, int8, int256. (int is int256)\n* address\n* bool\n* bytes<M>: binary type of M bytes, 0 < M <= 32\n* function: an address (20 bytes) followed by a function selector (4 bytes).\n* <type>[M]: an array of constant size of any type, e.g. int[32], string[7], bytes3[2],.... \n* bytes: an unlimited collection of bytes\n* string: string in UTF8\n* <type>[]: a variable-length array of elements of the given type. e.g. int[], string[], bytes3[],....\n* tuple: (T1,T2,...,Tn): tuple consisting of the types T1, â€¦, Tn, n >= 0, e.g. (int,string,int[32])\n\nIMPORTANT: you must spell the type name correctly! No redundant spaces, no Capitals, spelling it in a wrong way will cause the request to fail.\n\n* @subparam value representing the value of parameters in parameters_fields_types, e.g. [\"12345678\",\"34769874356980435879\",[\"1.2\",\"34\",\"-1.2\"],[\"bl\",\"cl\",\"mkasdsa\"],\"True\"]\nExcept than \"function\", \"fixed length array\", \"variable-length array\", \"tuple\", all the values must be given as strings, even ints.\nThose 4 types are given as python lists containing in inner value in each cell. Some examples:\n* uint<M>: any base 10 non negative number in range of M bits: \"2131\"  /  \"12131\"  /  \"45678906543467890\"  /  \"0\"\n* int<M>:  any base 10 number in range of two's complement M bits: \"2131\"  /  \"-2131\"  /  \"45678906543467890\"  / \"0\"\n* address: any EVM address, 0x + 40 hex chars \"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"   /   \"0x0000C138F990B4ED9B7CB83F6AD8FF76017572B9\", \"0xedf9c138f990b4ed9b7cb83f6ad8ff76017572b9\"\n* bool:   \"true\" / \"false\"\n* bytes<M>: given in hex with 0x prefix, must hold 2*M hex characters \"0x00F9C138F990b4ed9b7c\"   /   \"0xEDF9C138F990B4ED9B7CB83F6AD8FF76017572B9\"  /  \"0xe9\"\n* function: a python list of length 2, holding address and one of \"4 bytes digested function pointer e.g. 0x1234abcd\" or \"function declaration ready to be hashed, e.g. 'foo(int,string)'\"\n[\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\",\"0x1234abcd\"]  /  [\"0x0000C138F990B4ED9B7CB83F6AD8FF76017572B9\",\"foo(int,string)\"]\n* <type>[M]: python list of <type>, e.g. \nint[3]      -> [\"2342\",\"-32432\",\"1\"]\nbytes3[2]   -> [\"0x232323\",\"0x000011\",\"0xabABcd\"]\nbool[3]     -> [\"True\",\"True\",\"False\"]\n* bytes: same as bytes<M>, must start with 0x and hold an even non negative count of hex digits\n* string: \"hello world!\" / \"×©×œ×•× ×¢×•×œ×!\" / \"Ethereum is so cool :)\"\n* <type>[]: same as <type>[M]\n* tuple: (T1,T2,...,Tn):  python list of the types, e.g. \n(int,string,bool[3]) -> [\"-2133242\",\"tuples are kind of redundant,right?\", [\"True\",\"True\",\"False\"]]\n(int,string,(int, bool[3])) -> [\"7\",\"tuples are redundant\", [\"7\",[\"True\",\"True\",\"False\"]]] \n",
          "default": "[\n  [\"address\", \"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"],\n  [\"uint256\", \"100000000000000000\"]\n]\n\n\n        \n",
          "schema": []
        },
        {
          "kind": "optional",
          "name": "specificFromAddress",
          "type": "string",
          "example": "0x862842A56B5D5F30B7d519cCe683983F57499cE6",
          "description": "Deposit address to send from",
          "default": "0x862842A56B5D5F30B7d519cCe683983F57499cE6"
        },
        {
          "kind": "optional",
          "name": "evm_coin_symbol",
          "type": "string",
          "example": "ETH",
          "description": "<p>the coin symbol of the EVM network on which the smart contract is deployed, for example: ETH, CELO, etc...</p>",
          "default": "ETH"
        },
        {
          "kind": "optional",
          "name": "description",
          "type": "string",
          "example": "transferExample",
          "description": "<p>free text for describing the transaction (will not be sent to the blockchain)</p>",
          "default": "transferExample"
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Request data for an Ethereum transaction.",
          "customType": "sendTransactionToEvmContractWithContractInfoRequest",
          "schema": [
            {
              "name": "AccountId",
              "kind": "optional",
              "type": "integer",
              "description": "The ID of the user's account.",
              "example": 1,
              "default": 1
            },
            {
              "name": "CoinType",
              "kind": "optional",
              "type": "string",
              "description": "The type of cryptocurrency (e.g., ETH).",
              "example": "ETH",
              "default": "ETH"
            },
            {
              "name": "DataForContract",
              "kind": "optional",
              "type": "object",
              "description": "Data related to the smart contract transaction.",
              "example": "",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The name of the contract function (e.g., \"transfer\").",
                  "example": "transfer",
                  "default": "transfer"
                },
                {
                  "name": "ParametersFieldsTypesAndValues",
                  "kind": "optional",
                  "type": "array",
                  "description": "An array of parameter types and values.",
                  "example": "",
                  "itemType": "object",
                  "customType": "object[]",
                  "schema": [
                    {
                      "name": "ParameterType",
                      "kind": "optional",
                      "type": "string",
                      "description": "The parameter type (e.g., \"address\").",
                      "example": "address",
                      "default": "address"
                    },
                    {
                      "name": "ParameterValue",
                      "kind": "optional",
                      "type": "string",
                      "description": "The parameter value.",
                      "example": "0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9",
                      "default": "0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9"
                    }
                  ]
                },
                {
                  "name": "validateTransaction",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "A flag to validate the transaction (true or false).",
                  "example": "true",
                  "default": "true"
                }
              ]
            },
            {
              "name": "Fee",
              "kind": "optional",
              "type": "object",
              "description": "Transaction fee details.",
              "example": "",
              "schema": [
                {
                  "name": "GasLimit",
                  "kind": "optional",
                  "type": "integer",
                  "description": "The gas limit for the transaction.",
                  "example": 21500,
                  "default": 21500
                },
                {
                  "name": "GasPrice",
                  "kind": "optional",
                  "type": "string",
                  "description": "The gas price in wei.",
                  "example": "100000000000",
                  "default": "100000000000"
                }
              ]
            },
            {
              "name": "IsMetaMaskTransaction",
              "kind": "optional",
              "type": "boolean",
              "description": "A flag indicating if it's a MetaMask transaction (true or false).",
              "example": "False",
              "default": "False"
            },
            {
              "name": "SpecificFromAddress",
              "kind": "optional",
              "type": "string",
              "description": "The source address for the transaction.",
              "example": "0x862842A56B5D5F30B7d519cCe683983F57499cE6",
              "default": "0x862842A56B5D5F30B7d519cCe683983F57499cE6"
            },
            {
              "name": "Transactions",
              "kind": "optional",
              "type": "array",
              "description": "List of transaction details.",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "AmountToTransfer",
                  "kind": "optional",
                  "type": "string",
                  "description": "The amount to transfer in wei.",
                  "example": "6000",
                  "default": "6000"
                },
                {
                  "name": "DestinationAddress",
                  "kind": "optional",
                  "type": "string",
                  "description": "The destination Ethereum address.",
                  "example": "0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7",
                  "default": "0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7"
                }
              ]
            },
            {
              "name": "UserDescription",
              "kind": "optional",
              "type": "string",
              "description": "A user-provided description for the transaction.",
              "example": "transferExample",
              "default": "transferExample"
            },
            {
              "name": "Meta",
              "kind": "optional",
              "type": "object",
              "modelRef": "#/components/schemas/MetaTokensendTransactionToEvmContractWithContractinfo",
              "customType": "MetaTokensendTransactionToEvmContractWithContractinfo",
              "schema": [
                {
                  "name": "FunctionName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The Function to be called",
                  "example": "sendTransactionToEvmContractWithContractInfo",
                  "default": "sendTransactionToEvmContractWithContractInfo"
                },
                {
                  "name": "RandomData",
                  "kind": "optional",
                  "type": "string",
                  "description": "Random Data",
                  "example": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
                  "default": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229"
                },
                {
                  "name": "Destination",
                  "kind": "optional",
                  "type": "string",
                  "description": "Id of the server",
                  "example": "",
                  "default": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea"
                },
                {
                  "name": "Time",
                  "kind": "optional",
                  "type": "string",
                  "description": "UTC Time of execution",
                  "example": "2021-02-07T18:37:46.948Z",
                  "default": "2021-02-07T18:37:46.948Z"
                },
                {
                  "name": "Source",
                  "kind": "optional",
                  "type": "string",
                  "description": "User public key",
                  "example": "",
                  "default": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99"
                },
                {
                  "name": "AccessToken",
                  "kind": "optional",
                  "type": "string",
                  "description": "Token used for authentication purposes",
                  "example": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087",
                  "default": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/sendTransactionToEvmContractWithContractInfoRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "success",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "customType": "sendTransactionToEvmContractWithContractInfoResponse",
            "schema": [
              {
                "name": "FunctionData",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "ApprovalRequestStatus",
                    "kind": "optional",
                    "type": "integer",
                    "description": "returning integer type by enum options - \n\nPENDING = 0         #pending approval\nBEING_CANCELLED = 1 #canceled request\nEXPIRED = 2         #expired request\nAPPROVED = 3        #enough approvers before expired\nBEING_HANDLED = 4   #currently in handler\nHANDLED = 5        #finished handling\nCHECK_HANDLED = 6  #need to check status - if system shutdown while being handled\n",
                    "example": 4,
                    "default": 4
                  }
                ]
              },
              {
                "name": "CoinType",
                "kind": "optional",
                "type": "string",
                "description": "The coin in string to be used in this operation",
                "example": "ETH",
                "default": "ETH"
              },
              {
                "name": "Transactions",
                "kind": "optional",
                "type": "array",
                "description": "Array with every different txid for this transaction",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "AmountToTransfer",
                    "kind": "optional",
                    "type": "string",
                    "description": "Amount to be transferred in the crypto's smallest units (satoshi, wei, drops,...)",
                    "example": "6000",
                    "default": "6000"
                  },
                  {
                    "name": "DestinationAddress",
                    "kind": "optional",
                    "type": "string",
                    "description": "The address the amount is sent to",
                    "example": "0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7",
                    "default": "0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7"
                  }
                ]
              },
              {
                "name": "Meta",
                "kind": "optional",
                "type": "object",
                "modelRef": "#/components/schemas/MetaResponse",
                "customType": "MetaResponse",
                "schema": [
                  {
                    "name": "AccessToken",
                    "kind": "optional",
                    "type": "string",
                    "description": "The new access token generated after this operation",
                    "example": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6",
                    "default": "a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6"
                  },
                  {
                    "name": "Destination",
                    "kind": "optional",
                    "type": "string",
                    "description": "Id of the server",
                    "example": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622",
                    "default": "042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622"
                  },
                  {
                    "name": "Source",
                    "kind": "optional",
                    "type": "string",
                    "description": "User public key",
                    "example": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355",
                    "default": "df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355"
                  },
                  {
                    "name": "Time",
                    "kind": "optional",
                    "type": "string",
                    "description": "UTC Time of execution",
                    "example": "2021-02-14 09:58:52.320",
                    "default": "2021-02-14 09:58:52.320"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/sendTransactionToEvmContractWithContractInfoResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url 'http://1.1.1.1/sendTransactionToEvmContractWithContractInfo?account_id=1&contract_address=0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7&amount=6000&gas_limit=21500&gas_price=100000000000&function_name=transfer&validate_transaction=False&parameters_fields_types_and_values=%22[%5Cn%20%20[%5C%22address%5C%22%2C%20%5C%220xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9%5C%22]%2C%5Cn%20%20[%5C%22uint256%5C%22%2C%20%5C%22100000000000000000%5C%22]%5Cn]%5Cn%5Cn%5Cn%20%20%20%20%20%20%20%20%5Cn%22&specificFromAddress=0x862842A56B5D5F30B7d519cCe683983F57499cE6&evm_coin_symbol=ETH&description=transferExample' \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"AccountId\": 1,\n     \"CoinType\": \"ETH\",\n     \"DataForContract\": {\n     \"FunctionName\": \"transfer\",\n     \"ParametersFieldsTypesAndValues\": [\n     {\n     \"ParameterType\": \"address\",\n     \"ParameterValue\": \"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"\n     }\n     ],\n     \"validateTransaction\": \"true\"\n     },\n     \"Fee\": {\n     \"GasLimit\": 21500,\n     \"GasPrice\": \"100000000000\"\n     },\n     \"IsMetaMaskTransaction\": \"False\",\n     \"SpecificFromAddress\": \"0x862842A56B5D5F30B7d519cCe683983F57499cE6\",\n     \"Transactions\": [\n     {\n     \"AmountToTransfer\": \"6000\",\n     \"DestinationAddress\": \"0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7\"\n     }\n     ],\n     \"UserDescription\": \"transferExample\",\n     \"Meta\": {\n     \"FunctionName\": \"sendTransactionToEvmContractWithContractInfo\",\n     \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n     \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n     \"Time\": \"2021-02-07T18:37:46.948Z\",\n     \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n     \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"AccountId\": 1,\n   \"CoinType\": \"ETH\",\n   \"DataForContract\": {\n      \"FunctionName\": \"transfer\",\n      \"ParametersFieldsTypesAndValues\": [\n         {\n            \"ParameterType\": \"address\",\n            \"ParameterValue\": \"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"\n         }\n      ],\n      \"validateTransaction\": \"true\"\n   },\n   \"Fee\": {\n      \"GasLimit\": 21500,\n      \"GasPrice\": \"100000000000\"\n   },\n   \"IsMetaMaskTransaction\": \"False\",\n   \"SpecificFromAddress\": \"0x862842A56B5D5F30B7d519cCe683983F57499cE6\",\n   \"Transactions\": [\n      {\n         \"AmountToTransfer\": \"6000\",\n         \"DestinationAddress\": \"0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7\"\n      }\n   ],\n   \"UserDescription\": \"transferExample\",\n   \"Meta\": {\n      \"FunctionName\": \"sendTransactionToEvmContractWithContractInfo\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://1.1.1.1/sendTransactionToEvmContractWithContractInfo?account_id=1&contract_address=0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7&amount=6000&gas_limit=21500&gas_price=100000000000&function_name=transfer&validate_transaction=False&parameters_fields_types_and_values=\\\"[\\\\n  [\\\\\\\"address\\\\\\\", \\\\\\\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\\\\\\\"],\\\\n  [\\\\\\\"uint256\\\\\\\", \\\\\\\"100000000000000000\\\\\\\"]\\\\n]\\\\n\\\\n\\\\n        \\\\n\\\"&specificFromAddress=0x862842A56B5D5F30B7d519cCe683983F57499cE6&evm_coin_symbol=ETH&description=transferExample\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://1.1.1.1/sendTransactionToEvmContractWithContractInfo?account_id=1&contract_address=0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7&amount=6000&gas_limit=21500&gas_price=100000000000&function_name=transfer&validate_transaction=False&parameters_fields_types_and_values=\\\"[\\n  [\\\\\"address\\\\\", \\\\\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\\\\\"],\\n  [\\\\\"uint256\\\\\", \\\\\"100000000000000000\\\\\"]\\n]\\n\\n\\n        \\n\\\"&specificFromAddress=0x862842A56B5D5F30B7d519cCe683983F57499cE6&evm_coin_symbol=ETH&description=transferExample\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"AccountId\": 1,\n   \"CoinType\": \"ETH\",\n   \"DataForContract\": {\n      \"FunctionName\": \"transfer\",\n      \"ParametersFieldsTypesAndValues\": [\n         {\n            \"ParameterType\": \"address\",\n            \"ParameterValue\": \"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"\n         }\n      ],\n      \"validateTransaction\": \"true\"\n   },\n   \"Fee\": {\n      \"GasLimit\": 21500,\n      \"GasPrice\": \"100000000000\"\n   },\n   \"IsMetaMaskTransaction\": \"False\",\n   \"SpecificFromAddress\": \"0x862842A56B5D5F30B7d519cCe683983F57499cE6\",\n   \"Transactions\": [\n      {\n         \"AmountToTransfer\": \"6000\",\n         \"DestinationAddress\": \"0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7\"\n      }\n   ],\n   \"UserDescription\": \"transferExample\",\n   \"Meta\": {\n      \"FunctionName\": \"sendTransactionToEvmContractWithContractInfo\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://1.1.1.1/sendTransactionToEvmContractWithContractInfo?account_id=1&contract_address=0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7&amount=6000&gas_limit=21500&gas_price=100000000000&function_name=transfer&validate_transaction=False&parameters_fields_types_and_values=\\\"[\\\\n  [\\\\\\\"address\\\\\\\", \\\\\\\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\\\\\\\"],\\\\n  [\\\\\\\"uint256\\\\\\\", \\\\\\\"100000000000000000\\\\\\\"]\\\\n]\\\\n\\\\n\\\\n        \\\\n\\\"&specificFromAddress=0x862842A56B5D5F30B7d519cCe683983F57499cE6&evm_coin_symbol=ETH&description=transferExample\"\n\npayload = json.dumps({\n   \"AccountId\": 1,\n   \"CoinType\": \"ETH\",\n   \"DataForContract\": {\n      \"FunctionName\": \"transfer\",\n      \"ParametersFieldsTypesAndValues\": [\n         {\n            \"ParameterType\": \"address\",\n            \"ParameterValue\": \"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"\n         }\n      ],\n      \"validateTransaction\": \"true\"\n   },\n   \"Fee\": {\n      \"GasLimit\": 21500,\n      \"GasPrice\": \"100000000000\"\n   },\n   \"IsMetaMaskTransaction\": \"False\",\n   \"SpecificFromAddress\": \"0x862842A56B5D5F30B7d519cCe683983F57499cE6\",\n   \"Transactions\": [\n      {\n         \"AmountToTransfer\": \"6000\",\n         \"DestinationAddress\": \"0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7\"\n      }\n   ],\n   \"UserDescription\": \"transferExample\",\n   \"Meta\": {\n      \"FunctionName\": \"sendTransactionToEvmContractWithContractInfo\",\n      \"RandomData\": \"288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229\",\n      \"Destination\": \"b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea\",\n      \"Time\": \"2021-02-07T18:37:46.948Z\",\n      \"Source\": \"048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99\",\n      \"AccessToken\": \"51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// success\n{\n  \"FunctionData\": {\n    \"ApprovalRequestStatus\": 4\n  },\n  \"CoinType\": \"ETH\",\n  \"Transactions\": [\n    {\n      \"AmountToTransfer\": \"6000\",\n      \"DestinationAddress\": \"0x04e5C3F98ac6711baDd357A76E8FEAe226Dd60c7\"\n    }\n  ],\n  \"Meta\": {\n    \"AccessToken\": \"a3e816b5bc04302d99da94705ec2309a4a63fe10d6aed3c5f6fc9e7ff27c6be6\",\n    \"Destination\": \"042c671aeb148d9b2bb4918399c4c925f3764248c5ab2d5194ab0f32664132834692699a75e7fafb5af35f183b7d8a68bdc3b3e6ebfaff8ab555b9a3caf8090622\",\n    \"Source\": \"df4b76a23067a9d782d09a7372ed526ec713cf6d771fac4dbdb9610f7af36d570a157eed76986b8e85afde12888d10d10bef461399e490f3d7e4db44cde1b6e355\",\n    \"Time\": \"2021-02-14 09:58:52.320\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "GzVn4kAv4hLCIRSlIq7HH",
      "type": "bulleted-list",
      "children": [
        {
          "id": "lP8h4TOCF45SRqlyxMvUo",
          "type": "list-item",
          "children": [
            {
              "id": "Ce1vbFo4E5BlyaUVBOqDd",
              "type": "list-item-child",
              "children": [
                {
                  "text": "This function facilitates sending a transaction to an EVM (Ethereum Virtual Machine) smart contract",
                  "id": "S4Ru7AGwf5KBkuqSrS1vH"
                }
              ]
            }
          ]
        },
        {
          "id": "0le9z9_gNYlVgymRgHFzK",
          "type": "list-item",
          "children": [
            {
              "id": "kMKeZspzb1HZ1fPLY6mjC",
              "type": "list-item-child",
              "children": [
                {
                  "text": "return - Dict, e.g. {\"FunctionName\":\"transfer\",\n\"ParametersFieldsTypesAndValues\":[[\"address\",\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"], [\"uint256\",\"100000000000000000\"]]}",
                  "id": "GmUn-ebjc3pVZz3C_VrO1"
                },
                {
                  "text": "",
                  "id": "uBN5UMjIg-LTd9gfNO1Cj"
                },
                {
                  "text": "\n",
                  "id": "6pSrAVLhR7DXISqU4Y3tB"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "fGoCk3QqccNZGHsOOC9vm"
                },
                {
                  "text": "",
                  "id": "R1IQa5J83ey85vSREYPrY"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "FqF3WARwRSVAuvLQp8LIY"
                },
                {
                  "text": "** NOTE: success or failure in this api call does not necessarily means success or failure in the transaction itself.",
                  "id": "t7hpamskmar6K7r-Ysjf7"
                },
                {
                  "text": "",
                  "id": "p-s4D0bJtFzTfE9k0HGe0"
                },
                {
                  "text": "\n",
                  "id": "NMVqjieJvE_ZRd9vPG80D"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "Q2b2wfA5s1JnEb5DC36vk"
                },
                {
                  "text": "",
                  "id": "SU2T9TVqpBomGEVRKNtQH"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "Lg083nwpwQvfDnNGumee1"
                },
                {
                  "text": "** for example, the transaction may work by the response to the client can be lost in communication (if the internet is down for the client).",
                  "id": "v0WQwT4JnurSpdPGL-Yj3"
                },
                {
                  "text": "",
                  "id": "hFTrbfbUwoARhOC2bjlQ0"
                },
                {
                  "text": "\n",
                  "id": "DiRJv5k5rBgzlgLZvmKvm"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "zRYd7Jzr-X5i7gxhORZFW"
                },
                {
                  "text": "",
                  "id": "PkK5WtUHtP2F0lPZOd5l1"
                },
                {
                  "text": "",
                  "bold": true,
                  "id": "ZqNOS9qUvmbWe6A9HOuAl"
                },
                {
                  "text": "** another example is that the transaction was approved here but failed in the signing process\nTo know the status of the transaction you can access the function getTransactionByToken.",
                  "id": "l9gZdEJeCzZ6DWlgV-pSq"
                },
                {
                  "text": "",
                  "id": "nevAbLTUC6vfQJ-rdqIML"
                },
                {
                  "text": "\nTo get the token to send those functions you should call getCurrentToken one action BEFORE sendTransaction",
                  "id": "4Ud78pxMaBANNVsz0sgF6"
                },
                {
                  "text": "",
                  "id": "39UC45jYGicFyAllxHlFS"
                },
                {
                  "text": "\nmyTokenToStoreInTheDb = user.getCurrentToken()",
                  "id": "-vdaVJA8J2LdQcbV9BZu0"
                },
                {
                  "text": "",
                  "id": "P3hxNQhxynF-aqxwXgkXG"
                },
                {
                  "text": "\nsendTransactionToEvmContractWithContractInfo(...)",
                  "id": "GDC7h02ehxbXbDFgcrqH8"
                },
                {
                  "text": "",
                  "id": "xbCFlZEGvJhmMQ5tp4jL_"
                },
                {
                  "text": "\n.....",
                  "id": "KyXcHRzB-bjAXLvha4bA6"
                },
                {
                  "text": "",
                  "id": "-jKl0-DvEeho5H_fOd6fC"
                },
                {
                  "text": "\nuser.getTransactionByToken(myTokenToStoreInTheDb,\"ETH\")",
                  "id": "rpv7rqdVnkf5YqugH_OTu"
                },
                {
                  "text": "",
                  "id": "N816VdIu-OTPsR7ZA42kU"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": "MzX21sOsgJP9Rxjy07sMI",
      "type": "paragraph",
      "children": [
        {
          "text": "example:",
          "id": "TZCXy8bm6nLSa46Y5pHJw"
        }
      ]
    },
    {
      "id": "ZF52v_3JZZbN0QBqXffjP",
      "type": "bulleted-list",
      "children": [
        {
          "id": "nV8mrvxjm2UYinne4fPEG",
          "type": "list-item",
          "children": [
            {
              "id": "oE5AJw7Zaq8xy8pJirrFc",
              "type": "list-item-child",
              "children": [
                {
                  "text": "ETH: sendTransactionToEvmContractWithContractInfo(1,\"0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe\",\"6000\",",
                  "id": "yW3BUML_RG5RHIrsSziOd"
                },
                {
                  "text": "",
                  "id": "ivXTbHnNI3OhAjGW9JaB9"
                },
                {
                  "text": "\"50000000000\",70000, \"transfer\",[[\"address\",\"0xEDF9C138F990b4ed9b7cb83F6ad8fF76017572B9\"], [\"uint256\",\"100000000000000000\"]],True,\"false\",\"transferExample\",None,\"1000000000\",\"ETH\")",
                  "id": "HGBFlU274ylQrmlRB1qY7"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}