Back to Seatunnel

Web3j

docs/en/connectors/source/Web3j.md

2.3.131.7 KB
Original Source

import ChangeLog from '../changelog/connector-web3j.md';

Web3j

Web3j source connector

Support Those Engines

Spark

Flink

Seatunnel Zeta

Key Features

Description

Source connector for web3j. It is used to read data from the blockchain, such as block information, transactions, smart contract events, etc. Currently, it supports reading block height data.

Source Options

NameTypeRequiredDefaultDescription
urlStringYes-When using Infura as the service provider, the URL is used for communication with the Ethereum network.

How to Create a Http Data Synchronization Jobs

hocon
env {
  parallelism = 1
  job.mode = "BATCH"
}

source {
  Web3j {
    url = "https://mainnet.infura.io/v3/xxxxx"
  }
}

# Console printing of the read Http data
sink {
  Console {
    parallelism = 1
  }
}

Then you will get the following data:

json
{"blockNumber":19525949,"timestamp":"2024-03-27T13:28:45.605Z"}

Changelog

<ChangeLog />