Run a Contract

You can use Blockchain App Builder to query a deployed token or account/identity proxy, or to invoke a state-changing contract function.

After you compile a project, you can use the Execute tab in the Deploy / Execute form to query or invoke functions. The extension reads the selected contract ABI, presents the available functions, encodes the parameters, and sends the request through the transport appropriate for the selected environment. For composed projects, deploy and activate the token and account proxies before you attempt state-changing token operations.

The Execute tool discovers functions from compiled artifacts. For composed projects, the generated manifest also identifies the compatible account/identity ABI for the selected token. To access the Execute tool:
  1. Open the Contracts view.
  2. Select the Hardhat project and then open Deploy / Execute.
  3. Select the Execute tab.
  4. If the form includes a project selector, choose the project that owns the contract and its compiled artifacts.

You must complete the following fields to select a target and function before running a call.

  • Token: The compiled token contract whose ABI you want to use.
  • Call Target: Select Token to call the token proxy, or Account / Identity to call the paired account proxy. Select Token as the call target for token behavior such as balances, minting, transfers, configuration, and asset-class operations. Select Account / Identity for the companion account contract's identity, permission, or policy functions.
  • Target ABI: The ABI used to list and encode functions. A generated manifest locks the paired account ABI; otherwise select one manually.
  • toAddress: The deployed proxy address for the selected target. Do not enter a helper-library or implementation address.
  • Environment: The environment where that proxy is deployed.
  • Function: The ABI function to query or invoke. The list includes the function origin to help distinguish inherited capabilities.

Execution Path

The extension chooses or restricts the available mode based on the environment that you select.

Environment and API Mode Query Behavior Invocation Behavior Required Signer Information
Hardhat Local Node or Other EVM with JSON-RPC Calls the node using the selected local private key as from. Signs and broadcasts directly through JSON-RPC. A configured caller account or manually entered 32-byte private key.
Oracle Blockchain Platform Besu with JSON-RPC APIs Calls the Oracle Blockchain Platform JSON-RPC endpoint using the selected Wallet Service account address as from. Builds a transaction, requests a wallet service signature, then broadcasts it through Oracle Blockchain Platform JSON-RPC. Wallet service sign URL, accounts JSON, authorization token, and selected wallet account.
Oracle Blockchain Platform Besu with REST rpc-proxy APIs Posts to the Oracle Blockchain Platform query API. Posts to the Oracle Blockchain Platform transaction API. From Address; optionally gas and receipt-wait settings. No local private key or Wallet Service signer is entered in this mode.

REST rpc-proxy mode is available only for an Oracle Blockchain Platform Besu environment. The environment’s RPC URL Host, authentication token, and TLS settings are used for the REST calls. Other EVM and local Hardhat environments use JSON-RPC with local signing.

Query a Function

Use Query for a read call or to simulate a function against the current chain state.

  1. Select the target, environment, function, and parameters.
  2. Configure the caller or wallet information required by the selected execution path.
  3. Select Query.
  4. Review the Output field. JSON-RPC output includes the raw call result and decoded ABI result when decoding succeeds. REST output includes the API response.

Queries use a call request; they do not broadcast a transaction or persist state. A query can still revert if the selected function’s conditions, caller permissions, or supplied parameters are not valid for the current contract state.

Invoke a Function

Use Invoke for a state-changing transaction.
  1. Select the target, environment, function, and parameters.
  2. Configure the required signing method.
    • For Other EVM or Hardhat Local Node, select a configured caller account or enter the authorized private key.
    • For Oracle Blockchain Platform Wallet Service, supply the Sign URL, accounts JSON, authorization token, and select the wallet account.
    • For REST rpc-proxy, enter the From Address and, when needed, gas limit and receipt wait settings.
  3. Select Invoke.
  4. Wait for the result in Output. Successful JSON-RPC and Wallet Service invokes include transaction hash, block number, gas used, sender, target, and receipt status.
An invocation can be accepted by the transport but still revert on-chain. Treat a receipt status other than 1, or an error response, as a failed operation and inspect the output for a decoded custom error or RPC error details.

Enter Parameters

Select the … button beside Parameters to open the parameter editor. It displays the ABI parameter name, nested property, type, and an input field. Select the editor’s apply action to generate the JSON parameter array that will be used by Execute function.

Parameters are sent as one JSON array in the same order as the selected function’s ABI inputs.

ABI Input Pasteable Parameter JSON
No inputs []
balanceOf(address) ["0x1111111111111111111111111111111111111111"]
transfer(address,uint256) ["0x1111111111111111111111111111111111111111", "1000"]
A single tuple [{"fieldA":"value","fieldB":"1000"}]
A standalone tuple[] input [[{"userAddress":"0x1111111111111111111111111111111111111111","approvalSequence":1}]]

For integer ABI fields, enter a decimal string such as "1000" to avoid JavaScript numeric precision loss. Use JSON true or false for Boolean values. Addresses must be valid 0x addresses.

For tuples and tuple-array inputs, use named JSON objects whose property names match the ABI component names. Do not use Solidity positional tuple syntax in the parameter editor.

For example, when the editor is displaying an approverDetails tuple[] property with userAddress and approvalSequence components, paste the following value into that property’s JSON editor:

[
  {
    "userAddress": "0x1111111111111111111111111111111111111111",
    "approvalSequence": 1
  }
]

The parameter editor places that value inside the outer function-argument array. For a full tuple, enter every component shown by the selected ABI. The exact fields vary by contract version, so use the properties displayed in the parameter editor rather than copying a tuple shape from a different token project.

Wallet Service Input Format

For Oracle Blockchain Platform JSON-RPC mode, enter wallet service accounts as a JSON array. Each entry must have an address and can include a wallet ID as shown in the following example.

[
  {
    "address": "0x1111111111111111111111111111111111111111",
    "walletId": "0x1111111111111111111111111111111111111111"
  }
]

Select one of the parsed accounts in Wallet Account. Queries use its address as from; invocations ask the wallet service to sign for that account. The wallet service authorization token is not stored in the form’s saved draft.

Save and Reuse Inputs

Select Save Input to retain the current non-secret Execute selections and parameter JSON for the project. Select Clear Saved Input to remove the saved form state. Recheck proxy addresses, selected function, and parameters before an invocation; saved inputs do not prove that a target is still deployed on the currently selected environment.

Troubleshooting

Condition Resolution
After an upgrade, a newly added method is not listed in the ABI list on the Execute page Update the Blockchain App Builder manifest file (generated.manifest.json) to change contractClassName and contractRelativePath to point to the newly upgraded contract.
No ABI functions found Compile the project and confirm that the selected token/account artifact exists. For an account target without a manifest, select the correct account ABI manually.
Target address has no contract code Check the selected environment and enter the deployed proxy address, not a helper library or implementation address.
Invalid parameters JSON Use the … editor to regenerate the argument array. Ensure arrays and objects use valid JSON with double-quoted property names.
Wallet service account selection is required Enter a valid accounts JSON array and select a Wallet Account.
REST rpc-proxy APIs require an Oracle Blockchain Platform environment Switch to an Oracle Blockchain Platform Besu environment with a host-only RPC URL, or use JSON-RPC for Other EVM/Hardhat.
Unauthorized caller or a decoded custom error Verify the selected caller/wallet account, target proxy, active governance state, role/policy prerequisites, and ABI parameters.
Query or Invoke remains unavailable Complete the required target, environment, function, and signer fields for the selected API mode.