ContractAllMethodsGet()

Retrieve Methods of a Contract

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

Understanding Connector Object

Function Call

Field

Type

Description

byteCodeObjects

List<ByteCodeObject>

List of ByteCodeObject of Contract

ContractAllMethodsGet(List<ByteCodeObject>);

Return value of function: ContractAllMethodsGetResult

Example

Connector connect_ = new Connector("95.111.224.219", 9091);
NodeApi.ContractAllMethodsGetResult ContractMethods = connect_.ContractAllMethodsGet(connect_.SmartContractGet("12DHXQ8rzYUawD6VSD6WuVaTQ4uen7fStWsTmZASnDv1").SmartContract.SmartContractDeploy.ByteCodeObjects);
Console.WriteLine(ContractMethods);

Return value of function: ContractAllMethodsGetResult

Output of Example

Output is printed via ObjectDumper

{ContractAllMethodsGetResult}
  Code: 0
  Message: "success"
  Methods: ...
    {MethodDescription}
      ReturnType: "boolean"
      Name: "buyTokens"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "amount"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "boolean"
      Name: "transferFrom"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "from"
          Annotations: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "to"
          Annotations: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "amount"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "java.lang.String"
      Name: "getSymbol"
      Arguments: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "void"
      Name: "payable"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "amount"
          Annotations: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "currency"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "int"
      Name: "getDecimal"
      Arguments: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "boolean"
      Name: "setFrozen"
      Arguments: ...
        {MethodArgument}
          Type: "boolean"
          Name: "isFrozen"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "java.lang.String"
      Name: "totalSupply"
      Arguments: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "java.lang.String"
      Name: "balanceOf"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "owner"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "java.lang.String"
      Name: "allowance"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "owner"
          Annotations: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "spender"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "void"
      Name: "approve"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "spender"
          Annotations: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "amount"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "boolean"
      Name: "burn"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "amount"
          Annotations: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "java.lang.String"
      Name: "getName"
      Arguments: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "void"
      Name: "register"
      Arguments: ...
      Annotations: ...
    {MethodDescription}
      ReturnType: "boolean"
      Name: "transfer"
      Arguments: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "to"
          Annotations: ...
        {MethodArgument}
          Type: "java.lang.String"
          Name: "amount"
          Annotations: ...
      Annotations: ...

Last updated