SmartContractDataGet()

Retrieve Data of a Contract by Contract Address

Before calling the function make sure you have the Connector object initialized.

Understanding Connector Object

Function Call

Field

Type

Description

Address

string

Base58 ed25519 Smart Contract Address

SmartContractDataGet("Input here Base58 Smart Contract Key");

Return value of function: SmartContractDataResult

Example

Connector connect_ = new Connector("95.111.224.219", 9091);
NodeApi.SmartContractDataResult SmartContractData = connect_.SmartContractDataGet("12DHXQ8rzYUawD6VSD6WuVaTQ4uen7fStWsTmZASnDv1");
Console.WriteLine(SmartContractData);

Return value of function: SmartContractDataResult

Output of Example

Output is printed via ObjectDumper

{SmartContractDataResult}
  Status: {APIResponse}
    Code: 0
    Message: "Success: "
  Methods: ...
    {SmartContractMethod}
      ReturnType: "boolean"
      Name: "buyTokens"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "amount"
    {SmartContractMethod}
      ReturnType: "boolean"
      Name: "transferFrom"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "from"
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "to"
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "amount"
    {SmartContractMethod}
      ReturnType: "java.lang.String"
      Name: "getSymbol"
      Arguments: ...
    {SmartContractMethod}
      ReturnType: "void"
      Name: "payable"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "amount"
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "currency"
    {SmartContractMethod}
      ReturnType: "int"
      Name: "getDecimal"
      Arguments: ...
    {SmartContractMethod}
      ReturnType: "boolean"
      Name: "setFrozen"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "boolean"
          Name: "isFrozen"
    {SmartContractMethod}
      ReturnType: "java.lang.String"
      Name: "totalSupply"
      Arguments: ...
    {SmartContractMethod}
      ReturnType: "java.lang.String"
      Name: "balanceOf"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "owner"
    {SmartContractMethod}
      ReturnType: "java.lang.String"
      Name: "allowance"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "owner"
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "spender"
    {SmartContractMethod}
      ReturnType: "void"
      Name: "approve"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "spender"
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "amount"
    {SmartContractMethod}
      ReturnType: "boolean"
      Name: "burn"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "amount"
    {SmartContractMethod}
      ReturnType: "java.lang.String"
      Name: "getName"
      Arguments: ...
    {SmartContractMethod}
      ReturnType: "void"
      Name: "register"
      Arguments: ...
    {SmartContractMethod}
      ReturnType: "boolean"
      Name: "transfer"
      Arguments: ...
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "to"
        {SmartContractMethodArgument}
          Type: "java.lang.String"
          Name: "amount"
  Variables: ...

Last updated