Class Call

  • All Implemented Interfaces:

    @Serializable() 
    public final class Call
    
                        
    • Method Detail

      • fromCallArguments

         final static Call fromCallArguments(Felt contractAddress, Felt entrypoint, List<ConvertibleToCalldata> arguments)

        Construct a Call object using any objects conforming to ConvertibleToCalldata as calldata instead of plain Felts.

        For example:

        Call.fromCallArguments(
             Felt.fromHex("0x1234"),
             Felt.fromHex("0x111"),
             Collections.listOf(Uint256.fromHex("0x1394924"), Felt.ZERO)
        );
        Parameters:
        contractAddress - an address to be called
        entrypoint - a selector of the entrypoint to be called
        arguments - CallArguments to be used in a call
      • fromCallArguments

         final static Call fromCallArguments(Felt contractAddress, String entrypoint, List<ConvertibleToCalldata> arguments)

        Construct a Call object using any objects conforming to ConvertibleToCalldata as calldata instead of plain Felts, using selector name.

        For example:

        Call.fromCallArguments(
             Felt.fromHex("0x1234"),
             "mySelector",
             Collections.listOf(Uint256.fromHex("0x1394924"), Felt.ZERO)
        );
        
        @param contractAddress an address to be called
        @param entrypoint a name of the entrypoint to be called
        @param arguments CallArguments to be used in a call
        
        @return a Call object