Class ContractViewMethodCaller


  • public class ContractViewMethodCaller
    extends java.lang.Object
    Caller for contract methods
    Since:
    0.2.0
    Author:
    Alexandre Carvalho, Andre Bertolace
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> FunctionCallResult<T> call​(NearClient nearClient, java.lang.String contractAccountId, java.lang.String methodName, Base64String params, java.lang.Class<T> returnClass)
      Calls a contract for specific method
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContractViewMethodCaller

        public ContractViewMethodCaller()
    • Method Detail

      • call

        public static <T> FunctionCallResult<T> call​(NearClient nearClient,
                                                     java.lang.String contractAccountId,
                                                     java.lang.String methodName,
                                                     Base64String params,
                                                     java.lang.Class<T> returnClass)
                                              throws java.io.IOException
        Calls a contract for specific method
        Type Parameters:
        T - type of the result object
        Parameters:
        methodName - the method to call
        returnClass - the type of result object
        nearClient - the near service to use
        contractAccountId - the contract account id
        params - the method parameters encoded in Base64
        Returns:
        a typed FunctionCallResult for the requested contract method
        Throws:
        java.io.IOException - thrown when fails to map json to result object