Single Select Lookup > Ethereum > Query Smart Contract

This topic shows how to create a lookup with Ethereum as a data source that reads the value of a smart contract for the Single Select Lookup form control.

Background and Setup

Prerequisites

Good to Know

How to Start

  1. On the Single Select Lookup form control configuration screen, on the Configure tab, click Add Lookup.

    For information about how to open this screen, refer to Single Select Lookup form control.


    Click Add Lookup
  2. On the Select Data Source Type screen, select Ethereum.

    Select Ethereum
  3. Click Next.

Ethereum Type

Specifies the type of Ethereum lookup.

Figure: Ethereum Type screen

Ethereum Blockchain Type screen

Good to Know

Fields

Field NameDefinition

Ethereum Type

Function:
Specifies the type of lookup to create for Ethereum.
Accepted Values:
  • Query Smart Contract - Creates a lookup to read the value of a smart contract in Ethereum.
  • Execute Smart Contract - Creates a lookup to execute a contract function that changes the state of the smart contract in Ethereum.

    For this type, you must set a maximum price to execute a contract function in Ethereum.

Default Value:
Query Smart Contract

Lookup Details

Specifies the basic configuration for a lookup.

Figure: Ethereum Lookup Details screen

Ethereum Lookup Details screen

Fields

Field NameDefinition

Access Token

Function:
Specifies the access token that connects to your data source.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
This is a common configuration field that is used in many examples. Refer to:
  • Examples - Step-by-step use case examples, information about what types of examples are provided in the AgilePoint NX Product Documentation, and other resources where you can find more examples.

Add New Add New icon

Opens this Screen:
Access Token for Ethereum
Function of this Screen:
Configure an access token to connect to Ethereum.

Lookup Name

Function:
Specifies the name you want to give to your lookup procedure.
Accepted Values:
One line of text that can have spaces.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Lookup Type

Function:
Specifies the Name/Value type for the lookup procedure.

The Single Select Lookup form control does not support Multiple Columns lookups. If you select the Multiple Columns, the configuration screen shows Name/Value lookup type.

Accepted Values:
Read only.
Default Value:
Name/Value

Configure Lookup > Response tab

Specifies the information about a contract function to connect response data from the Ethereum data model to your AgilePoint NX schema.

Figure: Configure Lookup > Response tab

Configure Lookup screen Response tab

Fields

Field NameDefinition

Contract Address

Function:
Specifies the address of the smart contract whose value to read.

The contract address comes from Ethereum.

Accepted Values:
A contract address from Ethereum.
Default Value:
None
Accepts Process Data Variables:
Yes
Limitations:

Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation. It is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business use cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, or other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

Function Name

Function:
Specifies the name of the Ethereum function to use to read the value.
Accepted Values:
A function name from the list.

When you select the access token from the Ethereum field, this field shows the function names associated with the access token.

Default Value:
None
Limitations:

Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation. It is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business use cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, or other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

Request Mapping

Function:
Connects the information about the smart contract from the Ethereum data model to your AgilePoint NX schema.
Accepted Values:
To open the Schema Mapper, click the Ellipses (...) button.

Use this screen to connect the response to the data model for your process.

Default Value:
None
Example:
Refer to:

Configure Lookup > Error Messages tab

Configures the message to show if the lookup does not return any data.

Figure: Configure Lookup > Error Messages tab

Configure Lookup screen Error Messages tab

Fields

Field NameDefinition

No Items Retrieved

Function:
Specifies the error message to show if the lookup does not return any data.
Accepted Values:
One line of text that can have spaces.
Default Value:
None

Lookup Failed

Function:
Specifies the message to show if the data fails to load.
Accepted Values:
More than one line of text.
Default Value:
Failed to load data.