OpenParable
Skip to content
← Back to skills

Web3j

Development
web3j

Web3j is an Agent Skill for development published in the LFDT-web3j/web3j repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use this skill when the task involves creating a Java project with Web3j, adding Web3j dependencies, generating or using smart contract wrappers, deploying or interacting with Ethereum smart contracts from Java, creating wallets, using the Web3j CLI for project scaffolding or auditing, or working with separately documented Web3j ecosystem tools such as OpenAPI, Unit, EVM, Sokt, or the Eth2 client.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/LFDT-web3j/web3j/blob/HEAD/.agents/skills/web3j/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/web3j, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Web3j

This skill is for AI agents helping users consume the Web3j library and CLI.

Treat Web3j as two separate interfaces:

  • Java library usage inside application code
  • Web3j CLI usage from the shell

Do not blur these together. If the user asks for code inside a Java project, answer with the library APIs. If the user asks to scaffold a project, audit Solidity, or manage wallets from the terminal, answer with the CLI.

Routing

Repo-grounded examples

When you need canonical implementation patterns, prefer these local sources:

  • README.md for published dependency coordinates, Java version expectations, and high-level positioning
  • integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java for generated wrapper deploy/load/call patterns
  • integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java for lower-level raw contract deployment and ABI calls
  • integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java for ETH transfers and Transfer.sendFunds
  • integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java for block, transaction, pending-transaction, log, and replay flowables
  • integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java for manual EthFilter-based event filtering and log decoding
  • core/src/main/java/org/web3j/crypto/WalletUtils.java for wallet creation and credential loading APIs
  • core/src/main/java/org/web3j/tx/RawTransactionManager.java for local signing and raw transaction broadcast patterns
  • integration-tests/build.gradle for web3j-unit usage in this repo's test setup
  • integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java for private transaction and privacy group flows
  • besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java and eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java for privacy APIs
  • contracts/scripts/generateWrappers.sh and codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java for wrapper-generation CLI shape

Working rules

  • Prefer concise, copyable answers.
  • Separate "library code" from "CLI commands" with explicit headings when both are relevant.
  • If the user asks to create a new project, first decide whether they mean:
    • a CLI-scaffolded Web3j project
    • a CLI import or generated-project workflow
    • adding Web3j to an existing Maven or Gradle Java project
  • If the user asks how to contribute to Web3j itself, first decide whether they mean:
    • report a bug
    • submit a fix
    • propose a feature
    • ask a source-code question
  • For dependency coordinates and install steps, prefer official published usage from the docs and README.md.
  • For implementation details, prefer this repo's source and integration tests.
  • When showing smart contract usage, default to generated wrappers first and raw ABI / raw transaction flows second.
  • When the user asks for a basic ERC20 example or how Web3j pieces fit together across wrappers, tests, and events, prefer the starter assets under assets/erc20-example/.
  • When the user asks for a runnable event-listening example, prefer the starter assets under assets/event-subscriptions/ and adapt the closest template instead of writing one from scratch.
  • When answering audit questions, make clear that web3j audit is static analysis from the CLI toolchain, not a Java runtime API.
  • When answering OpenAPI, Unit, EVM, Sokt, or Eth2 questions, be explicit when the docs describe a companion library or generated project rather than a package implemented in this repo's main modules.
  • When helping with repo contributions, follow CONTRIBUTING.md: bug issues should include a real reproducer, fixes should be formatted with Spotless, and feature ideas should go through Discord discussion before GitHub issue creation.