input

  • For displaying an input, you can use the input() predicate:

// SYNTAX
input(input_type, input_id)

// EXAMPLE
prompt :-
  show [
    text('Receiver'),
    input(address, receiver_address),
    text('Amount'),
    input(eth, paid_amount)
  ].

input_id must be:

  • unique

  • in snake_case OR camelCase

  • Supported input types are:

    • address

    • bytes32

    • eth

    • text

  • Input values are automatically saved in the Input State. You can access them at any time using the get() predicate:

// SYNTAX
get(input/input_name, InputValue)

// EXAMPLE
get(input/receiver_address, ReceiverAddr)
get(input/paid_amount, PaidAmount)

Last updated