ABI Type Check

ABI type check feature warns you if any non-allowed data types are used as an input into a function, or a return value from a function. Certain types are blocked from being called from outside the contract to increase the security and consistency of the network.

Return Type Error

Only specific variable types can be used as return data from a public function. The following function will cause the plugin to show an error:

@Callable
public static BigDecimal exampleFunction() {
    BigDecimal foo = new BigDecimal("3141");
    return foo;
}

Return Type Error

Argument Type Error

Only specific variable types can be used as argument data from a public function. The following function will cause the plugin to show an error:

@Callable
public static String exampleFunction(BigDecimal foo) {
    String bar = foo.toString();
    return bar;
}

Argument Type Error

Private Functions

Restricted variable types (those not listed in the Variable Types section) can be used freely between private functions, and can be fed into public functions.

private static BigDecimal setBigDecimal()) {
    // Create a big decimal.
    BigDecimal foo = BigDecimal.valueOf(1.23456);

    // Return the big decimal.
    return foo;
}

@Callable
public static String getBigDecimal() {
    // Get a big decimal from the setBigDecimal() function.
    BigDecimal foo = setBigDecimal();

    // Convert the big decimal into a string.
    String bar = foo.toString();

    // Return the string.
    return bar;
}