Home

Utility Chain Integration

Overview#

The purpose of this article is to provide a brief overview of how to integrate with Dijets Utility Chain. An EVM-Compatible instance of Dijets Ternary Chain Ledger system. Supporting and integrating with Dijets Utility Chain is as straightforward as spinning up a Dijets Node (which has the same API as go-ethereum) and inputting the correct Chain ID for Dijets i.e 98200 when constructing transactions.

Integration Using EVM Endpoints#

Running a Dijets Node#

If you want to build your node form source or include it in a docker image, reference the DijetsNodeGo GitHub repository.

Configuring a Dijets Node#

All configuration options and their default values are described here.

You can supply configuration options on the command line, or use a config file, which can be easier to work with when supplying many options. You can specify the config file location with —config-file=config.json, where config.json is a JSON file whose keys and values are option names and values.

Individual chains, including the Utility Chain, have their own configuration options which are separate from the node-level options. These can also be specified in a config file. For more details, see here.

The Utility Chain config file should be at $HOME/.dijetsnodego/configs/chains/C/config.json. You can also tell DijetsNodeGo to look somewhere else for the Utility Chain config file with option --chain-config-dir. An example Utility Chain config file:


_20
{
_20
"cacid-api-enabled": false,
_20
"local-txs-enabled": true,
_20
"pruning-enabled": false,
_20
"coreth-admin-api-enabled": false,
_20
"eth-apis": [
_20
"internal-eth",
_20
"internal-blockchain",
_20
"internal-transaction",
_20
"internal-tx-pool",
_20
"internal-account",
_20
"internal-personal",
_20
"debug-tracer",
_20
"web3",
_20
"eth",
_20
"eth-filter",
_20
"admin",
_20
"net"
_20
]
_20
}

Interacting with the Utility Chain#

Interacting with the Utility Chain is identical to interacting with go-ethereum. You can find the reference material for Utility Chain API here.

Constructing Transactions#

Dijets Utility Chain transactions are identical to standard EVM transactions with 2 main exceptions:

  1. They must be signed with Dijets ChainID (98200).
  2. The detailed dynamic gas fee can be found here.

For development purposes, Dijets supports all the popular tooling for Ethereum, so developers familiar with Ethereum and Solidity can feel right at home. Tools like Remix, Truffle, Ganache work out of the box with Dijets Utility Chain.

Ingesting On-Chain Data#

You can use any standard way of ingesting on-chain data that you currently use for Ethereum network.

Determining Finality#

One of the most notable and differentiating features of Dijets is its sub-second finality. Dijets consensus provides fast and irreversible finality guaranteed within 1-2 seconds. To query the most up-to-date finalized block, query any value (that is block, balance, state, etc) with the latest parameter.

If you end up querying above the last finalized block (that is eth_blockNumber returns 10 and you query 11), an error will be thrown indicating that unfinalized data cannot be queried.

If you plan on reading JSON responses directly or use web3.js (doesn't recompute hash received over the wire) to extract on-chain transaction data/logs/receipts, then you shouldn't have any issues integrating Dijets Utility Chain.

Support#

If you have any problems or questions, reach out either directly to our developers, or on our public support room on Qowalts.