{"owner":"LFDT-web3j","repo":"web3j","hasSkills":true,"totalSkillsCount":19,"totalTokensCount":17443,"categories":["anthropic-skill","root-instruction"],"hasMcp":false,"mcpConfig":null,"found":[".agents/skills/web3j/SKILL.md",".agents/skills/web3j/assets/erc20-example/README.md",".agents/skills/web3j/assets/erc20-example/basic-erc20-app/README.md",".agents/skills/web3j/assets/event-subscriptions/README.md",".agents/skills/web3j/references/build-plugins.md",".agents/skills/web3j/references/cli.md",".agents/skills/web3j/references/contributing.md",".agents/skills/web3j/references/erc20-example.md",".agents/skills/web3j/references/events.md",".agents/skills/web3j/references/getting-started.md",".agents/skills/web3j/references/privacy-permissioning.md",".agents/skills/web3j/references/smart-contracts.md",".agents/skills/web3j/references/transactions.md",".agents/skills/web3j/references/web3j-eth2-client.md",".agents/skills/web3j/references/web3j-evm.md",".agents/skills/web3j/references/web3j-openapi.md",".agents/skills/web3j/references/web3j-sokt.md",".agents/skills/web3j/references/web3j-unit.md","AGENTS.md"],"skills":{".agents/skills/web3j/SKILL.md":"---\nname: web3j\ndescription: 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.\n---\n\n# Web3j\n\nThis skill is for AI agents helping users consume the Web3j library and CLI.\n\nTreat Web3j as two separate interfaces:\n\n- Java library usage inside application code\n- Web3j CLI usage from the shell\n\nDo 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.\n\n## Routing\n\n- For contributing to the Web3j library itself, including bug reports, fixes, feature proposals, formatting, PR expectations, and community discussion paths, read [references/contributing.md](references/contributing.md).\n- For project setup, dependency selection, module guidance, and \"how do I use this library\", read [references/getting-started.md](references/getting-started.md).\n- For end-to-end ERC20 examples that show how CLI scaffolding, wrapper generation, interaction, tests, and events fit together, read [references/erc20-example.md](references/erc20-example.md).\n- For event subscriptions, filters, flowables, WebSocket pub/sub, and runnable starter examples, read [references/events.md](references/events.md).\n- For smart contract wrapper generation, deployment, loading, calling, sending transactions, contract event subscriptions, and raw transaction fallbacks, read [references/smart-contracts.md](references/smart-contracts.md).\n- For `web3j new`, `web3j import`, `web3j run`, `web3j docker run`, `web3j wallet create`, `web3j wallet update`, `web3j wallet send`, `web3j audit`, and OpenAPI-oriented CLI scaffolding, read [references/cli.md](references/cli.md).\n- For Gradle and Maven plugin workflows, read [references/build-plugins.md](references/build-plugins.md).\n- For private transactions, Besu/EEA privacy APIs, and permissioned-network configuration context, read [references/privacy-permissioning.md](references/privacy-permissioning.md).\n- For transaction managers, signing, gas, nonces, EIP transaction types, wallet files, ETH transfers, generic log filters, and block/transaction flowables, read [references/transactions.md](references/transactions.md).\n- For the broader Web3j ecosystem tools named directly by the user, read:\n  - [references/web3j-eth2-client.md](references/web3j-eth2-client.md)\n  - [references/web3j-openapi.md](references/web3j-openapi.md)\n  - [references/web3j-unit.md](references/web3j-unit.md)\n  - [references/web3j-evm.md](references/web3j-evm.md)\n  - [references/web3j-sokt.md](references/web3j-sokt.md)\n\n## Repo-grounded examples\n\nWhen you need canonical implementation patterns, prefer these local sources:\n\n- `README.md` for published dependency coordinates, Java version expectations, and high-level positioning\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` for generated wrapper deploy/load/call patterns\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java` for lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java` for ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java` for block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java` for manual `EthFilter`-based event filtering and log decoding\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java` for wallet creation and credential loading APIs\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java` for local signing and raw transaction broadcast patterns\n- `integration-tests/build.gradle` for `web3j-unit` usage in this repo's test setup\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java` for private transaction and privacy group flows\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java` and `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java` for privacy APIs\n- `contracts/scripts/generateWrappers.sh` and `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` for wrapper-generation CLI shape\n\n## Working rules\n\n- Prefer concise, copyable answers.\n- Separate \"library code\" from \"CLI commands\" with explicit headings when both are relevant.\n- If the user asks to create a new project, first decide whether they mean:\n  - a CLI-scaffolded Web3j project\n  - a CLI import or generated-project workflow\n  - adding Web3j to an existing Maven or Gradle Java project\n- If the user asks how to contribute to Web3j itself, first decide whether they mean:\n  - report a bug\n  - submit a fix\n  - propose a feature\n  - ask a source-code question\n- For dependency coordinates and install steps, prefer official published usage from the docs and `README.md`.\n- For implementation details, prefer this repo's source and integration tests.\n- When showing smart contract usage, default to generated wrappers first and raw ABI / raw transaction flows second.\n- 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/`.\n- 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.\n- When answering audit questions, make clear that `web3j audit` is static analysis from the CLI toolchain, not a Java runtime API.\n- 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.\n- 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.\n",".agents/skills/web3j/assets/erc20-example/README.md":"# ERC20 Example Starters\n\nUse these starter assets when a user wants one example that shows how Web3j modules and companion tools fit together around an ERC20-like contract.\n\n## Templates\n\n- `basic-erc20-app/`\n  - minimal JVM-side app and test suite\n  - covers Solidity source, wrapper generation, deploy/load/call flow, typed events, and `@EVMTest`\n  - best answer for `show me a basic erc20 example`, `how do the web3j pieces fit together`, or `create a basic erc20 app`\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy `basic-erc20-app/` into the target directory\n2. keep the package names and wrapper package unless the user asks to rename them\n3. patch token metadata, endpoint defaults, or transfer env vars only if the user provided concrete values\n4. mention `web3j new` if they asked for a CLI-generated template\n5. mention `web3j_openapi` only if they want an HTTP layer on top of the same contract flow\n",".agents/skills/web3j/assets/erc20-example/basic-erc20-app/README.md":"# Basic ERC20 App\n\nThis starter is the shortest repo-grounded example that ties together:\n\n- Solidity source in `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- Web3j Unit `@EVMTest` coverage\n\nIt is intentionally a JVM-side starter, not a browser UI. If the user wants an HTTP layer, keep this contract/test flow and add `web3j_openapi` on top.\n\n## Files\n\n- `src/main/solidity/ExampleToken.sol`\n  - small ERC20-like contract with `Transfer` and `Approval` events\n- `src/main/java/example/Erc20ExampleApp.java`\n  - deploys the wrapper, reads token state, performs a transfer, and listens for `Transfer` events\n- `src/test/java/example/Erc20EvmTest.java`\n  - runs the same pattern under `@EVMTest`\n- `build.gradle`\n  - applies the Web3j Gradle plugin and fixes generated wrappers to `example.contracts`\n\n## Commands\n\nRun the test path:\n\n```sh\n./gradlew test\n```\n\nRun the deploy/interact/event path:\n\n```sh\nWEB3J_PRIVATE_KEY=0xyourprivatekey ./gradlew run\n```\n\n## Environment variables\n\n- `WEB3J_HTTP_URL`\n  - defaults to `http://localhost:8545`\n- `WEB3J_PRIVATE_KEY`\n  - required for `run`\n- `WEB3J_TOKEN_NAME`\n  - defaults to `Skill Token`\n- `WEB3J_TOKEN_SYMBOL`\n  - defaults to `SKILL`\n- `WEB3J_INITIAL_SUPPLY`\n  - defaults to `1000000`\n- `WEB3J_TRANSFER_TO`\n  - defaults to the deployer address so the transfer path can run without a second account\n- `WEB3J_TRANSFER_AMOUNT`\n  - defaults to `1`\n\n## How companion tools fit\n\nCLI scaffolding:\n\n- the published CLI docs already expose `web3j new`, and `erc20` is one of the documented templates\n\nWeb3j Sokt:\n\n- the published `v5.0.3` docs position Sokt as the direct compiler-resolution and native `solc` helper\n- the docs-backed shape is `SolidityFile -> getCompilerInstance() -> execute(...)`\n- this starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and leaves direct Sokt wiring as a follow-on step when the user asks for compiler-management code specifically\n\nWeb3j Unit and Web3j EVM:\n\n- `Erc20EvmTest` shows the concrete `@EVMTest` flow documented for Web3j Unit\n- when a user asks about `web3j-unit` or `web3j-evm`, point them to the test first because it is the most directly runnable path in this starter\n",".agents/skills/web3j/assets/event-subscriptions/README.md":"# Event Subscription Starters\n\nUse these starter projects when a user asks for a runnable Web3j event-listening example.\n\n## Templates\n\n- `websocket-newheads/`\n  - subscribes to new block headers over WebSocket\n  - best default runnable example\n- `contract-logs/`\n  - subscribes to contract logs with `EthFilter`\n  - best when the user already has a contract address and event topic\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy the closest starter into the target directory\n2. rename the package or project only if the user cares\n3. patch the env-var defaults if the user gave a concrete endpoint or contract\n4. explain the exact env vars required to run it\n\n## Runtime expectations\n\nThese templates are minimal Gradle Java apps.\n\nTypical run commands:\n\n```sh\ngradle run\n```\n\nor, if the target project has a wrapper:\n\n```sh\n./gradlew run\n```\n\n## Environment variables\n\n### `websocket-newheads`\n\n- `WEB3J_WS_URL`\n\n### `contract-logs`\n\n- `WEB3J_HTTP_URL`\n- `WEB3J_CONTRACT_ADDRESS`\n- `WEB3J_EVENT_TOPIC0` optional\n",".agents/skills/web3j/references/build-plugins.md":"# Build Plugins\n\nUse this file for prompts like:\n\n- `how do i use the web3j gradle plugin`\n- `how do i use the web3j maven plugin`\n- `generate wrappers during build`\n- `what build plugins does web3j have`\n\n## Scope\n\nWeb3j has companion build plugins outside this repo's main Java library modules.\n\nThe main plugin surfaces documented by the official docs sitemap are:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThe root `README.md` also points users to:\n\n- `web3j-maven-plugin`\n- `web3j-gradle-plugin`\n\nUse these when the user wants code generation integrated into a build rather than run manually from the CLI.\n\nThe `v5.0.3` docs also document generated-project build tasks around the CLI and OpenAPI flows. Treat those as generated-project tasks, not as proof that every task is a generic plugin feature.\n\n## When to recommend plugins\n\nPrefer a build plugin when the user wants:\n\n- contract wrapper generation as part of `build`, `compile`, or codegen phases\n- reproducible ABI/BIN-to-wrapper generation in CI\n- less manual `solc` plus CLI orchestration\n\nPrefer direct CLI commands when the user wants:\n\n- a one-off wrapper generation\n- exploration or debugging\n- minimal setup\n\n## Practical guidance\n\nThe functional goal of these plugins is the same as the CLI wrapper flow:\n\n1. compile Solidity or consume ABI/BIN artifacts\n2. generate Java wrappers\n3. place generated sources under the project source tree or generated-sources area\n\nIf the user already has a Gradle or Maven project, recommend the plugin that matches their build tool first.\n\nIf the user is not tied to a build tool yet, the CLI path is simpler to explain and is covered in `references/smart-contracts.md`.\n\nFor generated OpenAPI projects, the documented Gradle tasks include:\n\n- `generateContractWrappers`\n- `generateWeb3jOpenApi`\n- `generateWeb3jSwaggerUi`\n\nUse those only in the context of the generated project layout shown by the CLI/OpenAPI docs.\n\n## Repo-grounded context\n\nThis repo does not contain the plugin implementations themselves. It does contain the underlying code-generation logic and examples:\n\n- `README.md` links the Maven and Gradle plugins\n- `contracts/scripts/generateWrappers.sh` shows the CLI-based generation shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` shows the supported wrapper-generation inputs\n\n## Prompt-oriented answers\n\n### `what build plugins does web3j have`\n\nAnswer with:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThen ask whether the user wants:\n\n- wrappers generated during Gradle builds\n- wrappers generated during Maven builds\n- a one-off CLI alternative\n\n### `generate wrappers during build`\n\nDefault answer shape:\n\n1. identify the user's build tool\n2. recommend the matching Web3j plugin\n3. explain that it automates the same ABI/BIN-to-wrapper flow as `web3j generate solidity`\n4. if exact plugin DSL is needed, consult the plugin docs or plugin repo because that configuration lives outside this repo\n\n### `how do i generate openapi outputs during build`\n\nDefault answer shape:\n\n1. clarify whether they mean a CLI-generated OpenAPI project or a normal Gradle/Maven build\n2. if it is the generated project, point to the documented generated Gradle tasks\n3. if they want generic build-plugin DSL, do not invent it from this repo alone\n",".agents/skills/web3j/references/cli.md":"# Web3j CLI\n\nUse this file for prompts like:\n\n- `create a new project`\n- `import this project with web3j`\n- `audit this contract with web3j`\n- `create a wallet`\n- `run this generated project`\n- `generate an openapi service with web3j`\n- `send ether with the web3j cli`\n\nThis file is about the external Web3j CLI. Do not present these commands as Java library APIs.\n\n## Core commands\n\nProject scaffold:\n\n```sh\nweb3j new\n```\n\nImport a project into a CLI-managed Web3j layout:\n\n```sh\nweb3j import\n```\n\nOpenAPI project generation and packaging:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\nRun a generated project locally:\n\n```sh\nweb3j run\n```\n\nRun a generated project in Docker:\n\n```sh\nweb3j docker run [-l] <network> <wallet_path> <wallet_password>\n```\n\nCreate a wallet:\n\n```sh\nweb3j wallet create\n```\n\nUpdate a wallet password:\n\n```sh\nweb3j wallet update <walletfile>\n```\n\nSend ETH from a wallet:\n\n```sh\nweb3j wallet send <walletfile> 0x<address>|<ensName>\n```\n\nAudit a Solidity contract:\n\n```sh\nweb3j audit Campaign.sol\n```\n\nGenerate unit tests from generated wrappers:\n\n```sh\nweb3j generate tests\n```\n\n## Interpretation rules\n\n- `web3j audit` is static Solidity analysis from the CLI toolchain.\n- It is not a runtime Java API in this repo.\n- `web3j new`, `web3j import`, `web3j run`, and `web3j docker run` are shell workflows around generated projects.\n- `web3j openapi ...` commands are CLI workflows for generating or packaging OpenAPI-oriented projects, not core `org.web3j:core` APIs.\n- `wallet create`, `wallet update`, and `wallet send` are shell workflows.\n- If the user wants wallet creation inside Java code instead of the CLI, route them to `WalletUtils.generateBip39Wallet(...)`, `WalletUtils.generateNewWalletFile(...)`, or credential-loading APIs in the library.\n\nThe `v5.0.3` docs also show that `web3j new` supports named templates such as `helloworld`, `erc20`, and `erc777`, and a Kotlin option. Prefer mentioning those capabilities at a high level unless the user asks for the exact interactive flow.\n\n## Library counterpart for wallet tasks\n\nIf the user asks for Java code instead of CLI:\n\n- create encrypted wallet file:\n  - `WalletUtils.generateNewWalletFile(...)`\n  - `WalletUtils.generateLightNewWalletFile(...)`\n  - `WalletUtils.generateFullNewWalletFile(...)`\n- create BIP-39 wallet:\n  - `WalletUtils.generateBip39Wallet(...)`\n- load credentials:\n  - `WalletUtils.loadCredentials(...)`\n  - `WalletUtils.loadBip39Credentials(...)`\n\nRepo grounding:\n\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`\n\n## Generated-project runtime configuration\n\nThe `v5.0.3` CLI docs expose these environment variables for generated projects:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_PRIVATE_KEY`\n\nFor generated OpenAPI projects, the docs also show:\n\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n\nWhen the user asks how to run the generated project, prefer these generated-project Gradle tasks from the CLI docs:\n\n- `./gradlew build`\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n- `./gradlew clean`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user is asking from a terminal-user perspective, answer with:\n\n```sh\nweb3j new\n```\n\nThen mention:\n\n- `web3j new` is for a CLI scaffold\n- `web3j import` is for bringing an existing project into the generated-project workflow\n- adding `org.web3j:core` to an existing Java project is covered in `references/getting-started.md`\n\n### `audit this contract with web3j`\n\nDefault answer:\n\n```sh\nweb3j audit MyContract.sol\n```\n\nClarify:\n\n- this performs static analysis on Solidity source\n- output includes issue location, severity, description, and rule identifier\n- it is useful before deployment, not after a contract is already on-chain\n\n### `create a wallet`\n\nDefault terminal answer:\n\n```sh\nweb3j wallet create\n```\n\nIf the user wants code instead, switch to the Java wallet APIs from `WalletUtils`.\n\n### `run this generated project`\n\nDefault terminal answer:\n\n```sh\nweb3j run\n```\n\nThen mention the generated-project environment variables or the generated Gradle tasks if they need wrapper regeneration or OpenAPI output first.\n\n### `generate an openapi service with web3j`\n\nDefault CLI answer:\n\n```sh\nweb3j openapi new\n```\n\nIf the user wants runtime configuration, generated JAR packaging, or the Kotlin client surface, route them to `references/web3j-openapi.md`.\n",".agents/skills/web3j/references/contributing.md":"# Contributing\n\nUse this file for prompts like:\n\n- `how do i contribute to web3j`\n- `i found a bug in web3j`\n- `how should i submit a fix`\n- `i want to add a feature to web3j`\n- `where should i ask questions about the source code`\n\n## Scope\n\nThis file is for contributing to the Web3j library and repo itself, not for using Web3j as a dependency in an application.\n\nPrimary repo grounding:\n\n- `CONTRIBUTING.md`\n- `AGENTS.md`\n- `README.md`\n\n## Community entry points\n\nThe repo's contribution guidance highlights these community channels:\n\n- the Hyperledger Web3j community page\n- the recurring Web3j contributor call\n- the Web3j Discord channel under the Hyperledger server\n\nIf the user cannot access the Web3j Discord channel directly, the repo guidance says to join the Hyperledger Discord server first and then use the Web3j channel.\n\n## Bug reports\n\nIf the user found a bug:\n\n1. search existing GitHub issues first\n2. if an issue already exists, add useful details or signal support there\n3. if not, open a new issue with:\n   - a clear title\n   - a clear description\n   - relevant context\n   - a code sample, or preferably an executable test case\n\nBest contributor guidance:\n\n- prefer a reproducer over a vague narrative\n- if the user is already in the repo, suggest placing the reproducer near the relevant module or scenario-style tests\n\n## Bug fixes and patches\n\nIf the user already wrote a fix:\n\n1. open a pull request\n2. clearly describe the problem and the solution\n3. link the related issue when applicable\n4. run Spotless formatting before pushing\n\nRequired repo-specific reminder:\n\n```sh\n./gradlew spotlessApply\n```\n\nThe contribution guide explicitly warns that the build can fail if formatting is not applied.\n\nPair that with the repo's normal validation guidance:\n\n- run the narrowest relevant Gradle test task first\n- expand to broader validation only when needed\n\n## New features or behavior changes\n\nThe contribution guide treats feature work differently from bug fixes.\n\nIf the user wants to add a feature or make a behavior change:\n\n1. discuss the idea on Discord first\n2. wait for positive feedback\n3. only then move toward implementation and PR work\n\nImportant boundary from the repo guide:\n\n- do not open a GitHub issue first for speculative feature proposals\n- GitHub issues are mainly for bug reports and fixes\n\n## Source-code questions\n\nIf the user is asking how the source works or where to discuss implementation ideas:\n\n- direct them to the Web3j Discord channel\n- keep GitHub issues focused on actionable bugs/fixes unless maintainers ask otherwise\n\n## Contribution-ready workflow\n\nWhen an agent is helping with a contribution, the safest default flow is:\n\n1. identify whether it is a bug, patch, feature proposal, or source-code question\n2. if bug:\n   - search issues\n   - build a reproducer or executable test\n3. if fix:\n   - make the minimal patch\n   - run `./gradlew spotlessApply`\n   - run narrow tests\n   - open a PR with issue context\n4. if feature:\n   - prepare a short proposal\n   - direct the user to Discord first\n\n## Prompt-oriented answers\n\n### `i found a bug in web3j`\n\nDefault answer:\n\n1. search GitHub issues first\n2. if nothing matches, open a new issue\n3. include a minimal code sample or, ideally, an executable test case\n4. if they want help reproducing it, build that test in the relevant module\n\n### `how should i submit a fix`\n\nDefault answer:\n\n1. make the patch\n2. run:\n\n```sh\n./gradlew spotlessApply\n```\n\n3. run the narrowest relevant tests\n4. open a PR describing the problem and solution\n5. include the issue number if one exists\n\n### `i want to add a feature to web3j`\n\nDefault answer:\n\n1. discuss it on Discord first\n2. wait for positive feedback\n3. then start implementation\n\nDo not default to \"open a GitHub issue first\" for feature ideas, because that conflicts with the repo guidance.\n",".agents/skills/web3j/references/erc20-example.md":"# ERC20 Example\n\nUse this file for prompts like:\n\n- `show me a basic erc20 example with web3j`\n- `create a basic erc20 web app`\n- `how do the web3j pieces fit together`\n- `show me wrappers tests and events in one example`\n- `scaffold an erc20 project with web3j`\n\n## Decision rule\n\nDecide which of these the user actually needs:\n\n1. a CLI-generated starter such as `web3j new` with the `erc20` template\n2. a repo-grounded end-to-end example that an agent can copy and adapt quickly\n3. an actual HTTP or OpenAPI surface on top of contract logic\n\nIf they want the shortest runnable example that also shows tests and events, prefer the local starter asset.\n\n## Default starter\n\nUse:\n\n- `assets/erc20-example/basic-erc20-app/`\n\nThis is the default answer for an AI agent when the user wants one example that ties together:\n\n- Solidity source under `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- `@EVMTest`-based contract testing\n\n## What this starter covers\n\nThe starter is intentionally wrapper-first and repo-grounded.\n\nIt shows:\n\n1. an ERC20-like contract with `Transfer` and `Approval` events\n2. generated wrappers placed in a fixed package for stable imports\n3. a small JVM app that deploys the contract, reads state, sends a transfer, and listens for `Transfer` events\n4. a JUnit test using `@EVMTest` to exercise the same flow\n\nRepo grounding for the pattern:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## CLI and web-surface routing\n\nIf the user asks from a terminal-user perspective, mention that the official CLI docs already expose:\n\n```sh\nweb3j new\n```\n\nand that the published templates include `erc20`.\n\nIf the user truly wants an HTTP or browser-facing layer, this starter is still the right contract and test baseline, but route them onward to:\n\n- `references/web3j-openapi.md`\n\nfor the generated web surface.\n\n## Sokt boundary\n\nThe published `v5.0.3` docs show `web3j-sokt` as a companion compiler-wrapper library that works around:\n\n- `SolidityFile`\n- `getCompilerInstance()`\n- `SolcArguments`\n- `execute(...)`\n\nUse `references/web3j-sokt.md` when the user explicitly wants direct compiler-resolution or native `solc` invocation from code.\n\nThe local ERC20 starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and treats Sokt as the companion compilation surface rather than guessing extra local integration code.\n\n## Prompt-oriented answers\n\n### `show me a basic erc20 example with web3j`\n\nDefault answer:\n\n1. copy `assets/erc20-example/basic-erc20-app/`\n2. run `./gradlew test` for the `@EVMTest` flow\n3. run `WEB3J_PRIVATE_KEY=... ./gradlew run` for the deploy/call/event flow\n4. adapt token name, symbol, endpoint, and transfer defaults as needed\n\n### `create a basic erc20 web app`\n\nDefault answer:\n\n1. start from `assets/erc20-example/basic-erc20-app/` for the contract, wrappers, tests, and events\n2. if they mean CLI scaffolding, mention `web3j new` with the `erc20` template\n3. if they mean an HTTP layer, extend the same contract flow with `references/web3j-openapi.md`\n\n### `how do the web3j pieces fit together`\n\nDefault answer:\n\n1. Solidity contract source defines the ERC20 behavior\n2. the Web3j Gradle plugin generates wrappers\n3. the Java app deploys and calls the wrapper\n4. event flowables provide typed subscriptions\n5. Web3j Unit drives the `@EVMTest` contract test\n",".agents/skills/web3j/references/events.md":"# Events\n\nUse this file for prompts like:\n\n- `how do i subscribe to events with web3j`\n- `how do i subscribe to contract events with web3j`\n- `how do i watch new blocks with web3j`\n- `how do i use flowables with web3j`\n- `scaffold me a runnable event-listener example`\n- `show me a full contract example with events`\n\n## Decision rule\n\nDecide which event-listening path the user actually needs:\n\n1. contract events from a deployed contract with generated wrappers\n2. generic contract logs without wrappers\n3. node-level events such as new heads or pending transactions\n4. replaying past blocks or transactions\n\nIf the user asks for a runnable starter, prefer the closest asset under `../assets/event-subscriptions/`.\n\n## Default recommendations\n\nPrefer these paths in order:\n\n1. generated wrapper `...EventFlowable(...)` helpers for contract events\n2. `EthFilter` plus `web3j.ethLogFlowable(filter)` for generic logs\n3. `WebSocketService` plus `web3j.newHeadsNotifications()` or other Web3j flowables for push subscriptions\n\nAlways dispose the subscription when it is no longer needed.\n\n## Runnable starter assets\n\nUse these templates when the user wants a quick scaffold:\n\n- `assets/event-subscriptions/websocket-newheads/`\n  - immediate runnable example for `newHeads` subscriptions over WebSocket\n  - best answer for \"watch new blocks\", \"subscribe to new heads\", or \"show me a running example\"\n- `assets/event-subscriptions/contract-logs/`\n  - runnable generic contract-log listener using `EthFilter`\n  - best answer when the user has a contract address and event signature/topic but no generated wrapper yet\n- `assets/erc20-example/basic-erc20-app/`\n  - end-to-end contract example with wrapper generation, deploy/load/call flow, `@EVMTest`, and typed `Transfer` event subscriptions\n  - best answer when the user wants event listening as part of a fuller smart-contract workflow instead of a bare listener\n\nWhen adapting these assets, copy the nearest template and then only patch:\n\n- project name\n- package name if needed\n- endpoint defaults\n- contract address / topic env vars\n- token metadata or transfer defaults for the ERC20 starter\n\n## Wrapper-based contract events\n\nIf the user already has a generated wrapper, prefer this path:\n\n1. load the contract wrapper\n2. call `...EventFlowable(startBlock, endBlock)` or `...EventFlowable(filter)`\n3. subscribe to the returned RxJava `Flowable`\n4. dispose the subscription on shutdown\n\nRoute to `references/smart-contracts.md` for the wrapper-specific pattern.\nRoute to `references/erc20-example.md` when the user wants the event subscription embedded in a runnable deploy/interact example.\n\n## Generic logs with EthFilter\n\nIf the user does not have wrappers, use:\n\n1. `EthFilter` for block range and address\n2. `addSingleTopic(...)` or optional topics when needed\n3. `web3j.ethLogFlowable(filter)`\n4. raw log printing or manual decoding\n\nImportant notes from the docs:\n\n- filters work on indexed topics\n- omitting topics broadens the subscription\n- the docs note that filters are not supported on Infura\n\nRoute to `references/transactions.md` for lower-level filter details.\n\n## WebSocket pub/sub\n\nIf the user wants push subscriptions instead of polling:\n\n1. create `WebSocketService`\n2. connect it\n3. build `Web3j` from that service\n4. subscribe via `newHeadsNotifications()` or other flowables\n\nUse the `websocket-newheads` asset as the default runnable starter.\n\n## Repo grounding\n\nBest local sources:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\n## Prompt-oriented answers\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n1. if it is a contract event and wrappers exist, use the generated `...EventFlowable(...)` helper\n2. otherwise use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n3. for node-level push subscriptions such as new heads, use `WebSocketService`\n4. if they want a runnable starter, scaffold from `assets/event-subscriptions/`\n\n### `scaffold me a runnable event-listener example`\n\nDefault choice:\n\n- use `assets/event-subscriptions/websocket-newheads/` unless the user explicitly asks for contract logs\n- use `assets/event-subscriptions/contract-logs/` when they already have a contract address and topic or event signature\n- use `assets/erc20-example/basic-erc20-app/` when they want the event subscription to live inside a complete smart-contract example\n",".agents/skills/web3j/references/getting-started.md":"# Getting Started\n\nUse this file for prompts like:\n\n- `create a new project`\n- `how do i use this library`\n- `add web3j to my java project`\n- `what module do i need`\n\n## Decision rule\n\nDecide which of these the user means:\n\n1. A brand new Web3j project scaffold from the CLI\n2. Importing or generating a CLI-managed Web3j project\n3. Adding Web3j to an existing Java project\n4. Understanding which modules and APIs to use\n\nIf the prompt is ambiguous, prefer the narrowest useful answer and mention the alternate path briefly.\n\n## New project via CLI\n\nFor a brand new project scaffold, use the Web3j CLI:\n\n```sh\nweb3j new\n```\n\nThe `v5.0.3` CLI docs show this as the project-generation entry point for Java or Kotlin scaffolds, including templates such as `helloworld`, `erc20`, and `erc777`.\n\nThis is a CLI workflow, not an in-repo Java API.\n\nIf the user is clearly asking about importing an existing contract-driven project into a generated Web3j layout, route them to the CLI workflow instead:\n\n```sh\nweb3j import\n```\n\nIf the user asks how to install the CLI first, point them to the official Web3j command-line tools docs and the project `README.md`.\n\n## Add Web3j to an existing Java project\n\nThe main dependency for standard JVM usage is `org.web3j:core`.\n\nExample Maven dependency from the repo `README.md`:\n\n```xml\n<dependency>\n  <groupId>org.web3j</groupId>\n  <artifactId>core</artifactId>\n  <version>5.0.3</version>\n</dependency>\n```\n\nExample Gradle dependency from the repo `README.md`:\n\n```groovy\nimplementation('org.web3j:core:5.0.3')\n```\n\nImportant:\n\n- The repo currently documents Java 21 for current Java binaries.\n- This repo itself is at `5.0.3-SNAPSHOT`, so if the user needs a released version, prefer the published coordinates from the docs or `README.md` rather than guessing from local snapshot state.\n- If the user is asking for OpenAPI server generation rather than a normal JVM app dependency, route them to `references/web3j-openapi.md`.\n\n## Module guidance\n\nDefault module choices:\n\n- `core`: primary JVM entry point for JSON-RPC, credentials, transactions, contract wrappers, ENS, and common Ethereum workflows\n- `abi`: low-level ABI encoding and decoding\n- `codegen`: wrapper generation utilities\n- `crypto`: key, wallet, and signing primitives\n- `contracts`: reusable EIP contract support\n- `besu`, `geth`, `parity`, `eea`: client-specific or protocol-specific surfaces\n\nRecommend `core` unless the user has a specific low-level need.\n\n## Minimal library usage pattern\n\nFor a basic Java integration, the common flow is:\n\n1. Create a `Web3j` client\n2. Load `Credentials`\n3. Use JSON-RPC APIs directly or use generated contract wrappers\n\nExample:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\n```\n\nFrom there:\n\n- for smart contracts, route to `references/smart-contracts.md`\n- for wallet CLI tasks, route to `references/cli.md`\n- for OpenAPI-generated services, route to `references/web3j-openapi.md`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user wants a Web3j scaffold:\n\n```sh\nweb3j new\n```\n\nIf they mean \"import or generate a CLI-managed project from existing artifacts\", route them to:\n\n```sh\nweb3j import\n```\n\nIf they mean \"add Web3j to my existing app\", give the `core` dependency and a minimal `Web3j.build(...)` example instead.\n\n### `how do i use this library`\n\nGive this structure:\n\n1. Add `org.web3j:core`\n2. Create a `Web3j` client\n3. Load credentials or connect read-only\n4. Use JSON-RPC directly or generate contract wrappers\n\nPoint contract questions to `references/smart-contracts.md`.\n",".agents/skills/web3j/references/privacy-permissioning.md":"# Privacy And Permissioning\n\nUse this file for prompts like:\n\n- `how do i use privacy with web3j`\n- `how do i send a private transaction with besu`\n- `how do privacy groups work`\n- `what about permissioning in a besu network`\n\n## Scope\n\nThe published `v5.0.3` docs group these topics under `Privacy & Permissioning`.\n\nIn this repo, privacy support is strongly represented by:\n\n- the `besu` module\n- the `eea` module\n- privacy-focused integration tests under `integration-tests`\n\nPermissioning is not exposed as a first-class Java helper surface in the same way privacy is, but the integration-test network configuration shows how permissioned Besu nodes are configured in practice.\n\n## Primary Java surfaces\n\nFor Besu privacy:\n\n- `org.web3j.tx.PrivateTransactionManager`\n- `org.web3j.tx.BesuPrivateTransactionManager`\n- `org.web3j.tx.LegacyPrivateTransactionManager`\n- `org.web3j.tx.gas.BesuPrivacyGasProvider`\n- `org.web3j.protocol.besu.Besu`\n- `org.web3j.protocol.besu.response.privacy.*`\n\nFor EEA/private transaction encoding:\n\n- `org.web3j.protocol.eea.Eea`\n- `org.web3j.protocol.eea.crypto.RawPrivateTransaction`\n- `org.web3j.protocol.eea.crypto.PrivateTransactionEncoder`\n- `org.web3j.utils.Base64String`\n- `org.web3j.utils.Restriction`\n\n## Recommended starting point\n\nIf the user wants application-level private transactions on Besu, start from:\n\n- a `Besu` client\n- enclave public keys / privacy participants\n- a `PrivateTransactionManager`\n- either a generated wrapper or a manually built `RawPrivateTransaction`\n\nThe `v5.0.3` docs also show on-chain privacy-group management and private smart-contract flows as first-class privacy tasks.\n\n## Repo-grounded examples\n\nStrongest examples:\n\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/PrivateTransactionEncoder.java`\n- `besu/src/main/java/org/web3j/protocol/besu/Besu.java`\n\nThe privacy quickstart test demonstrates:\n\n1. creating or retrieving a privacy group\n2. building a private contract deployment transaction\n3. signing it with `PrivateTransactionEncoder`\n4. sending it with `eeaSendRawTransaction`\n5. retrieving a private receipt\n6. using `PrivateTransactionManager` with generated wrappers\n\nThe `v5.0.3` privacy docs also show privacy-group operations such as:\n\n- `privOnChainCreatePrivacyGroup(...)`\n- `privOnChainFindPrivacyGroup(...)`\n- `privOnChainAddToPrivacyGroup(...)`\n- `privOnChainRemoveFromPrivacyGroup(...)`\n\nAnd they show private contract interaction through:\n\n- `BesuPrivateTransactionManager`\n- generated wrappers loaded or deployed against a privacy group\n\n## Permissioning context\n\nFor permissioned Besu network configuration, inspect:\n\n- `integration-tests/src/test/resources/quorum-test-network/config/besu/config.toml`\n\nThis test setup shows node-permissioning configuration such as:\n\n- `permissions-nodes-config-file-enabled=true`\n- a configured permissions file path\n\nUse this as environment context, not as proof of a higher-level Web3j Java abstraction for permissioning.\n\n## Prompt-oriented answers\n\n### `how do i send a private transaction with besu`\n\nDefault answer shape:\n\n1. connect with a `Besu` client\n2. create or identify the target privacy group if needed\n3. construct a `PrivateTransactionManager` or `RawPrivateTransaction`\n4. supply enclave keys / privacy group details\n5. sign using privacy-specific encoding\n6. send and wait for a private receipt\n\nIf the user wants private smart-contract deployment, prefer the wrapper-based `BesuPrivateTransactionManager` flow after the privacy group is ready.\n\n### `how do privacy groups work`\n\nDefault answer shape:\n\n1. privacy groups define which participants can view the private state and transactions\n2. use the Besu privacy APIs to create, find, add members, or remove members\n3. once the group exists, deploy or load contracts against that group with a private transaction manager\n\n### `what about permissioning`\n\nClarify:\n\n- privacy and permissioning are related but different concerns\n- this repo provides substantial privacy APIs\n- permissioning is more visible here as Besu node/network configuration context than as a dedicated convenience layer\n\nUse the local Besu config under `integration-tests` as environment grounding, not as proof of a high-level Web3j permissioning API.\n",".agents/skills/web3j/references/smart-contracts.md":"# Smart Contracts\n\nUse this file for prompts like:\n\n- `how do i deploy & interact with smart contracts`\n- `using web3j, deploy a contract & call a function`\n- `generate wrappers for this solidity contract`\n- `call this contract method with web3j`\n- `how do i subscribe to contract events with web3j`\n\nPrefer generated wrappers first. Use raw transaction and ABI flows only when the user explicitly wants lower-level control or does not have generated wrappers.\n\n## Wrapper generation\n\nThe standard flow is:\n\n1. Compile Solidity to `.bin` and `.abi`\n2. Generate Java wrappers\n3. Use the generated class for deploy, load, call, and transact\n\nCompile with `solc`:\n\n```sh\nsolc MyContract.sol --bin --abi --optimize -o build/\n```\n\nGenerate wrappers with the Web3j CLI:\n\n```sh\nweb3j generate solidity \\\n  -b build/MyContract.bin \\\n  -a build/MyContract.abi \\\n  -o src/main/java \\\n  -p com.example.contracts\n```\n\nRepo grounding:\n\n- `contracts/scripts/generateWrappers.sh` uses the same general flow\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` confirms the supported arguments, including `-a`, `-b`, `-o`, `-p`, `-c`, `-B`, and `-r`\n\n## Recommended deploy/load pattern\n\nUse a `Web3j` client, load `Credentials`, and supply a `ContractGasProvider`.\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n```\n\nDeploy with a generated wrapper:\n\n```java\nMyContract contract = MyContract.deploy(\n        web3j,\n        credentials,\n        gasProvider\n).send();\n```\n\nLoad an existing deployment:\n\n```java\nMyContract contract = MyContract.load(\n        \"0xYourContractAddress\",\n        web3j,\n        credentials,\n        gasProvider\n);\n```\n\n## Call vs transact\n\nRead-only call:\n\n```java\nBigInteger value = contract.get().send();\n```\n\nState-changing transaction:\n\n```java\nTransactionReceipt receipt = contract.set(BigInteger.valueOf(1000)).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SimpleStorageContractIT.java` shows deploy, `set(...)`, and `get()`\n- `integration-tests/.../FunctionWrappersIT.java` shows deploy, load, return-value calls, and event extraction\n\n## Subscribe to contract events\n\nFor smart-contract event listening, prefer generated wrapper flowables before building raw log filters yourself.\n\nGenerated wrappers expose event helpers shaped like:\n\n- `transferEventFlowable(EthFilter filter)`\n- `transferEventFlowable(startBlock, endBlock)`\n\nThe generator code in this repo confirms that wrapper generation emits `...EventFlowable(...)` methods backed by `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nDisposable subscription =\n        myContract.someEventFlowable(\n                        DefaultBlockParameterName.EARLIEST,\n                        DefaultBlockParameterName.LATEST)\n                .subscribe(event -> {\n                    // use typed event fields from the generated response\n                });\n```\n\nIf you need tighter filtering, build the filter yourself and pass it to the wrapper:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                myContract.getContractAddress());\n\nDisposable subscription =\n        myContract.someEventFlowable(filter)\n                .subscribe(event -> {\n                    // handle event\n                });\n```\n\nAlways dispose the subscription when you no longer need it.\n\nRepo grounding:\n\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\nIf the user wants a single runnable example that combines wrapper generation, deployment, calls, tests, and event subscriptions, route them to `references/erc20-example.md` and the starter asset under `assets/erc20-example/basic-erc20-app/`.\n\n## Lower-level raw deployment and ABI calls\n\nUse this when the user wants raw JSON-RPC style control or no wrapper exists.\n\nKey pieces:\n\n- `RawTransaction.createContractTransaction(...)` for deployment\n- `TransactionEncoder.signMessage(...)` for signing\n- `FunctionEncoder.encode(...)` for ABI-encoding a function call\n- `ethCall(...)` for read-only execution\n- `ethSendRawTransaction(...)` for signed writes\n\nRepo grounding:\n\n- `integration-tests/.../DeployContractIT.java` shows raw contract deployment and a follow-up ABI-encoded function call\n\n## ETH transfer alongside contract work\n\nIf the user also needs to fund an account or send ETH, prefer:\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SendEtherIT.java`\n\n## Prompt-oriented answers\n\n### `how do i deploy & interact with smart contracts`\n\nAnswer with:\n\n1. Compile Solidity to ABI and BIN\n2. Generate wrappers with `web3j generate solidity`\n3. Load `Web3j`, `Credentials`, and a gas provider\n4. `MyContract.deploy(...).send()`\n5. `MyContract.load(...)`\n6. Call read methods with `.send()`\n7. Send write methods with `.send()` and inspect `TransactionReceipt`\n\n### `using web3j, deploy a contract & call a function`\n\nDefault example shape:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\"password\", \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n\nMyContract contract = MyContract.deploy(web3j, credentials, gasProvider).send();\nBigInteger result = contract.someViewMethod(BigInteger.TEN).send();\n```\n\nIf the user explicitly says they do not want wrapper generation, switch to the raw deployment and ABI-call pattern from `DeployContractIT`.\n\n### `how do i subscribe to contract events with web3j`\n\nDefault answer shape:\n\n1. generate or use the contract wrapper\n2. load the deployed contract\n3. call the generated `...EventFlowable(...)` helper\n4. subscribe to the returned RxJava `Flowable`\n5. dispose the subscription when done\n\nIf the user does not have wrappers, switch to the lower-level `EthFilter` plus `web3j.ethLogFlowable(...)` pattern from `references/transactions.md`.\n",".agents/skills/web3j/references/transactions.md":"# Transactions\n\nUse this file for prompts like:\n\n- `how do transactions work in web3j`\n- `how do i sign and send a transaction`\n- `how do i use eip-1559`\n- `how do i transfer ether`\n- `how do i handle nonces and gas`\n- `how do logs fit into transactions`\n- `how do i subscribe to events with web3j`\n- `what about wallet files`\n- `what about eip-7702`\n\n## Core transaction surfaces\n\nThe main transaction abstractions in this repo are:\n\n- `TransactionManager`\n- `RawTransactionManager`\n- `ClientTransactionManager`\n- `ReadonlyTransactionManager`\n- `Transfer`\n- `RawTransaction`\n- `TransactionEncoder`\n\nThe strongest repo-grounded file for local signing and send flow is:\n\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`\n\n## Default recommendation\n\nChoose the simplest abstraction that fits:\n\n1. `Transfer.sendFunds(...)` for basic ETH transfers\n2. generated contract wrappers for contract creation, calls, and writes\n3. `RawTransactionManager` for locally signed general-purpose transactions\n4. manual `RawTransaction` plus encoder flow for low-level control\n\nThe `v5.0.3` docs explicitly separate transaction topics into:\n\n- Ether transfer\n- Smart contract creation and contract interaction\n- Wallet files and credentials\n- Logs and events\n- EIP transaction types, including `EIP-1559`, `EIP-2930`, `EIP-4844`, and `EIP-7702`\n\n## Common patterns\n\n### ETH transfer\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n### Local signing and broadcast\n\n`RawTransactionManager`:\n\n- fetches the pending nonce\n- signs locally\n- sends via `ethSendRawTransaction`\n- verifies local and remote tx hashes\n\nUse it when the user wants explicit signing control without manually assembling every JSON-RPC call.\n\n### Manual raw transaction flow\n\nFor the most explicit control:\n\n1. build a `RawTransaction`\n2. sign with `TransactionEncoder`\n3. hex-encode it\n4. call `ethSendRawTransaction`\n\nThis pattern is visible in:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n## Transaction topics to cover when relevant\n\n- credentials and wallet files\n- gas price vs max fee / priority fee\n- nonces\n- transaction receipts\n- chain IDs and EIP-155 signing\n- EIP-1559 transactions\n- EIP-2930 and newer transaction types if the user asks specifically\n- contract creation vs contract calls vs read-only `ethCall`\n- logs and event decoding after transactions are mined\n\n## Wallet files\n\nIf the user asks about wallet files in a transaction context, connect them to:\n\n- `WalletUtils` for wallet generation and credential loading\n- `Credentials` for signer material\n- CLI wallet workflows only if they explicitly want a shell command\n\nThe `v5.0.3` docs expose wallet files as a dedicated transaction topic, so answer wallet-file questions as part of normal transaction setup rather than treating them as a side topic.\n\n## Transactions and smart contracts\n\nThe `v5.0.3` docs separate these flows explicitly:\n\n1. transfer Ether\n2. create a smart contract\n3. transact with a smart contract\n4. query contract state with a read-only call\n\nIn this repo, the best examples remain:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n\nPrefer wrappers first, then raw ABI / raw transaction examples.\n\n## Logs and events\n\nThe `v5.0.3` docs expose Ethereum logs as a first-class transaction topic.\n\nWhen the user asks about \"what happened after my transaction\":\n\n- explain that state-changing transactions often emit logs\n- prefer wrapper-generated event response types when wrappers exist\n- otherwise decode logs from the receipt with ABI/event utilities\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` shows event extraction patterns from generated wrappers\n\n## Generic event subscriptions and flowables\n\nThe `v5.0.3` docs cover two related event-listening paths:\n\n1. polling/filter-based flowables\n2. WebSocket pub/sub subscriptions\n\nFor generic log subscriptions, the docs show `EthFilter` plus `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                contractAddress);\n\nfilter.addSingleTopic(EventEncoder.encode(MY_EVENT));\n\nDisposable subscription =\n        web3j.ethLogFlowable(filter)\n                .subscribe(log -> {\n                    // decode log or hand it to wrapper helpers\n                });\n```\n\nImportant notes from the docs:\n\n- topic filters only work on indexed event parameters\n- if you omit topics, you can capture all matching logs for the address/range\n- filters should be unsubscribed or disposed when no longer needed\n- the published docs note that filters are not supported on Infura\n\nFor generic chain activity, the docs and local tests also expose:\n\n- `web3j.blockFlowable(...)`\n- `web3j.transactionFlowable()`\n- `web3j.pendingTransactionFlowable()`\n- replay flowables for past blocks and transactions\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## WebSocket pub/sub\n\nIf the user wants push-style subscriptions instead of polling, the docs route through `WebSocketService`.\n\nHigh-level shape:\n\n1. connect with `WebSocketService`\n2. build `Web3j` from that service\n3. subscribe via the WebSocket-backed flowable or notification helper\n4. dispose the subscription when done\n\nUse this path for prompts about:\n\n- subscribing to new heads\n- pending transactions\n- pub/sub over WebSocket\n- avoiding polling\n\n## Prompt-oriented answers\n\n### `how do i sign and send a transaction`\n\nDefault answer:\n\n- use `RawTransactionManager` if they want a reusable manager abstraction\n- use manual `RawTransaction` plus `TransactionEncoder` if they want to see every step\n\n### `how do i use eip-1559`\n\nPoint them to:\n\n- `RawTransactionManager.sendEIP1559Transaction(...)`\n\nand explain the required fields:\n\n- chain ID\n- max priority fee per gas\n- max fee per gas\n- gas limit\n- target address\n- data\n- value\n\nIf they ask about other transaction types, explain that the official `v5.0.3` docs also cover `EIP-2930`, `EIP-4844`, and `EIP-7702`, and then verify the exact helper or construction path in local source before naming a convenience API that is not already in active use here.\n\n### `how do i transfer ether`\n\nDefault to `Transfer.sendFunds(...)` unless the user explicitly wants raw transaction assembly.\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n- for contract events, prefer generated wrapper `...EventFlowable(...)` helpers\n- for generic logs, use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n- for node-level push subscriptions such as new heads, use a `WebSocketService` path and the Web3j flowables\n- always dispose the subscription when finished\n\n### `what about eip-7702`\n\nDefault answer shape:\n\n- the `v5.0.3` docs include `EIP-7702` as a dedicated transaction-type topic\n- treat it as a specialized transaction flow, not the default transfer or wrapper path\n- verify the exact local Web3j helper or transaction-construction API before giving a code sample beyond the high-level flow\n",".agents/skills/web3j/references/web3j-eth2-client.md":"# Web3j Eth2 Client\n\nUse this file for prompts like:\n\n- `what is web3j eth2 client`\n- `how do i use the web3j beacon node client`\n- `how do i talk to an eth2 beacon node from java`\n- `how do i subscribe to beacon chain events`\n\n## Positioning\n\nThe `v5.0.3` docs include `web3j_eth2_client` as a separately documented companion library.\n\nTreat it as an adjacent Web3j ecosystem library, not as part of this repo's main `core` / `abi` / `crypto` module set.\n\n## What the docs show\n\nThe docs describe it as a Beacon Node API client for interacting with Eth2 / Beacon Chain nodes through the Eth2 API specification, including event subscriptions.\n\nThe documented artifact is separate from `org.web3j:core`:\n\n```xml\n<dependency>\n    <groupId>org.web3j.eth2</groupId>\n    <artifactId>beacon-node-api</artifactId>\n    <version>1.0.0</version>\n</dependency>\n```\n\nImportant:\n\n- this dependency is versioned separately from `org.web3j:core:5.0.3`\n- do not replace it with core Web3j coordinates\n\n## Basic client shape\n\nThe docs show this usage pattern:\n\n1. create a `BeaconNodeService`\n2. build the client with `BeaconNodeClientFactory.build(...)`\n3. call typed Beacon API resources from the client\n\nExample shape from the docs:\n\n```java\nvar service = new BeaconNodeService(\"http://...\");\nvar client = BeaconNodeClientFactory.build(service);\n```\n\nThen use the Beacon API resources, for example:\n\n- `client.getBeacon().getBlocks().findById(...)`\n- `client.getBeacon().getPool().getAttesterSlashings().findAll()`\n\n## Event subscriptions\n\nThe docs explicitly describe event subscriptions as part of the client surface.\n\nDocumented high-level flow:\n\n1. create the client\n2. choose event topics\n3. subscribe with the event API\n4. wait for callbacks or latch completion in test/demo code\n\nIf the user asks about listening for events, explain that the docs show Beacon event subscriptions as a native capability of this client rather than something built on the main `Web3j` JSON-RPC client.\n\n## Local test network context\n\nThe docs show a local Teku-based test-network example for trying the Beacon client against local nodes.\n\nUse that as ecosystem guidance, not as a statement that this repo contains the Eth2 test-network implementation.\n\n## Repo boundary\n\nThis repo does not contain a top-level `web3j-eth2` module implementing this client.\n\nSo:\n\n- do not invent local imports or modules from this repo\n- do not claim `org.web3j:core` directly exposes Beacon Node APIs\n- do use the official `v5.0.3` docs guidance when the user explicitly asks about the Eth2 client\n\n## Safe default response\n\nDescribe the Web3j Eth2 client as a separate Beacon Node API client library, then offer one of these directions:\n\n- add the `beacon-node-api` dependency\n- create a client and query Beacon data\n- subscribe to Beacon events\n- connect the client to a local test network\n",".agents/skills/web3j/references/web3j-evm.md":"# Web3j EVM\n\nUse this file for prompts like:\n\n- `what is web3j evm`\n- `how do i use web3j evm`\n- `run contracts against a local evm with web3j`\n\n## Positioning\n\n`web3j_evm` appears in the official `v5.0.3` docs sitemap as a separate documentation area.\n\nTreat it as companion tooling in the broader Web3j ecosystem, not as a core module implemented in this repo.\n\n## Practical routing\n\nFor most users asking how to run or test contracts against a local EVM, the most useful runnable path in this repo context is:\n\n- `references/web3j-unit.md`\n- `assets/erc20-example/basic-erc20-app/`\n\nThat path gives them a concrete `@EVMTest` example without inventing a separate local `web3j-evm` API surface.\n\n## Safe boundaries\n\nThis repo does not have a clearly named `web3j-evm` module. Do not invent:\n\n- local module coordinates\n- APIs\n- config blocks\n- test harness calls\n\nunless the user provides them from their own project or the dedicated docs are consulted.\n\n## How to help anyway\n\nIf the user asks about Web3j EVM, clarify whether they want:\n\n- a lightweight local execution environment\n- testing support for contracts and transactions\n- integration with existing Web3j Java code\n\nThen connect it back to the main repo concepts they will still use:\n\n- `Web3j` clients\n- credentials\n- transaction flows\n- generated wrappers\n- `@EVMTest` or `@EVMComposeTest` when the actual goal is testing\n\n## Safe default response\n\nDescribe Web3j EVM as a companion ecosystem topic around local or controlled EVM execution for Java-based workflows, then ask which concrete task they want:\n\n- deploy a contract\n- run tests\n- simulate transactions\n",".agents/skills/web3j/references/web3j-openapi.md":"# Web3j OpenAPI\n\nUse this file for prompts like:\n\n- `what is web3j openapi`\n- `how do i use web3j openapi`\n- `generate an openapi service with web3j`\n- `how do i run a web3j openapi server`\n- `how do i call a web3j openapi server`\n\n## Positioning\n\n`web3j_openapi` is a separately documented Web3j ecosystem surface in the `v5.0.3` docs. It is not one of the main runtime modules in this repo like `core`, `abi`, or `crypto`.\n\nTreat it as generated-project and companion-tooling guidance, not as a core `org.web3j:core` package.\n\n## What the docs support\n\nThe `v5.0.3` docs support these broad workflows:\n\n- generate an OpenAPI-oriented project from the CLI\n- package or generate server artifacts\n- configure runtime parameters through CLI args, config files, or environment variables\n- run the generated server with Gradle, an executable distribution, or a JAR\n- call the generated server through the Web3j OpenAPI Kotlin/Java client\n- handle contract events through Server-Sent Events\n\nCore CLI entry points called out in the docs:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\n## Runtime configuration\n\nThe docs describe three configuration paths for generated OpenAPI servers:\n\n1. CLI arguments\n2. a config file\n3. environment variables\n\nImportant environment variables from the docs:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_PRIVATE_KEY`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n- `WEB3J_OPENAPI_CONFIG_FILE`\n\n## Build and run paths\n\nThe docs show these generated-project run and packaging patterns:\n\n- `./gradlew run`\n- `./gradlew shadowJar`\n- `./gradlew installShadowDist`\n\nFor CLI-generated projects, the command-line docs also show generated tasks such as:\n\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n\n## Client usage\n\nThe `v5.0.3` docs show the OpenAPI client as a separate dependency:\n\n```groovy\nimplementation \"org.web3j.openapi:web3j-openapi-client:5.0.3\"\n```\n\nThe documented client shape is:\n\n- create a `ClientService`\n- create the app client with `ClientFactory.create(...)`\n- call generated contract resources from the typed API\n- use SSE helpers for event subscriptions\n\n## Repo boundary\n\nThis repo does not expose a top-level `openapi` module in the same way it exposes `core`, `abi`, or `crypto`.\n\nSo:\n\n- do not invent local classes or configuration blocks\n- do not pretend `org.web3j:core` directly provides the OpenAPI server/client toolchain\n- do treat it as official Web3j companion tooling documented in `v5.0.3`\n\n## Recommended answer pattern\n\nIf a user asks how to use Web3j OpenAPI:\n\n1. clarify whether they want server generation, runtime configuration, packaging, or client usage\n2. answer with the CLI-generated-project path first\n3. separate server-generation guidance from client-consumption guidance\n4. only connect back to `org.web3j:core` when the question is about the contract logic behind the generated service\n\n## Safe default response\n\nDescribe Web3j OpenAPI as a separately documented Web3j toolchain for generating and running blockchain-backed OpenAPI services, then offer one of these directions:\n\n- scaffold a service\n- configure and run the generated server\n- use the Kotlin/Java client\n- subscribe to contract events via SSE\n",".agents/skills/web3j/references/web3j-sokt.md":"# Web3j Sokt\n\nUse this file for prompts like:\n\n- `what is web3j sokt`\n- `how do i use web3j sokt`\n- `set up sokt with web3j`\n\n## Positioning\n\n`web3j_sokt` appears in the official `v5.0.3` docs as a separate documentation area.\n\nTreat it as a companion Web3j ecosystem tool, not as something implemented inside this repo's main Java modules.\n\n## What the `v5.0.3` docs show\n\nThe published docs describe Sokt as:\n\n- a Kotlin wrapper around `solc`\n- a tool that can resolve the ideal compiler version from the Solidity `pragma`\n- a native compiler runner for Mac, Windows, and Linux x86/64\n\nThe docs show this dependency coordinate:\n\n- `org.web3j:web3j-sokt:0.2.1`\n\nAnd they show this concrete usage shape:\n\n1. create a `SolidityFile`\n2. call `getCompilerInstance()`\n3. execute the compiler with `SolcArguments`\n4. inspect `SolcOutput`\n\n## Safe boundaries\n\nThis repo still does not expose a clearly named `sokt` module. Because of that:\n\n- do not infer local classes or imports\n- do not claim it is part of `core`, `abi`, `crypto`, or `codegen`\n- do not invent extra build-tool wiring beyond what the dedicated docs explicitly provide\n\n## How to answer\n\nIf the user explicitly names Web3j Sokt:\n\n1. acknowledge it as the dedicated compiler-resolution and `solc` helper\n2. ask whether they want direct compiler usage or wrapper generation in a build\n3. if they want a runnable wrapper-first project, route them to `references/erc20-example.md`\n4. if they want the direct compiler API, answer with the docs-backed `SolidityFile -> getCompilerInstance() -> execute(...)` flow\n\n## Safe default response\n\nSay that Web3j Sokt is the companion compiler wrapper for resolving and running `solc`, and distinguish it from the Gradle-plugin wrapper-generation path used in `assets/erc20-example/basic-erc20-app/`.\n",".agents/skills/web3j/references/web3j-unit.md":"# Web3j Unit\n\nUse this file for prompts like:\n\n- `how do i use web3j unit`\n- `how do i test web3j code`\n- `how do i run blockchain integration tests in java`\n\n## Positioning\n\n`web3j-unit` is the separately documented testing companion for Web3j and JUnit 5.\n\nRepo grounding:\n\n- `integration-tests/build.gradle` includes `testImplementation(\"org.web3j:web3j-unit:$web3jUnitVersion\")`\n- the root build defines `web3jUnitVersion`\n- test configuration enables JUnit Jupiter extension autodetection\n\nThis indicates Web3j Unit is the preferred testing companion when the user wants JVM-side blockchain integration tests.\n\n## What the `v5.0.3` docs show\n\nThe docs describe Web3j Unit as a JUnit 5 extension that supports:\n\n- embedded EVM tests\n- dockerized node tests\n- out-of-the-box node support for Geth, Besu, and OpenEthereum\n- docker-compose-based multi-node setups\n\nThe docs explicitly show these annotations:\n\n- `@EVMTest`\n- `@EVMComposeTest`\n\nAnd they explicitly show test-method injection of:\n\n- `Web3j`\n- `TransactionManager`\n- `ContractGasProvider`\n\nThey also show a contract deployment example using a generated `Greeter` wrapper.\n\n## Important version note\n\nThe `v5.0.3` docs page still shows older example dependency coordinates in its sample snippet. For version-sensitive answers, prefer:\n\n- this repo's actual `web3jUnitVersion` usage for local implementation context\n- the published `v5.0.3` docs for the API shape and testing workflow\n\n## Recommended answer pattern\n\nFor a user asking how to test with Web3j Unit:\n\n1. add `web3j-unit` as a test dependency\n2. keep Web3j core modules in normal dependencies\n3. use JUnit 5\n4. choose `@EVMTest` for embedded or single-node tests\n5. choose `@EVMComposeTest` for docker-compose-backed environments\n6. model deployment and interaction tests after this repo's integration tests\n\nThe best local examples for contract and transaction behavior are still:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n- `SendEtherIT`\n\nFor an AI-facing starter that combines wrappers, events, and `@EVMTest` in one place, prefer:\n\n- `assets/erc20-example/basic-erc20-app/`\n\n## Concrete usage shape\n\nFor `@EVMTest`, the docs show this pattern:\n\n1. annotate the test class with `@EVMTest`\n2. optionally select a node type such as Geth or Besu\n3. inject `Web3j`, `TransactionManager`, and `ContractGasProvider` into the test method\n4. deploy and call a generated wrapper in the test\n\nFor `@EVMComposeTest`, the docs show this pattern:\n\n1. annotate the class with `@EVMComposeTest(...)`\n2. optionally provide compose file path, service name, and port\n3. inject the same Web3j test dependencies into the method\n4. deploy and interact with the contract in the compose-backed environment\n\nThe docs also point to sample projects:\n\n- `web3j-unitexample`\n- `web3j-unit-docker-compose-example`\n\n## Safe default response\n\nSay that Web3j Unit is the JUnit 5 testing companion for Web3j, and then offer one of these directions:\n\n- adding the dependency to a Gradle or Maven test scope\n- writing an `@EVMTest` contract deployment test\n- writing an `@EVMComposeTest` docker-backed test\n","AGENTS.md":"# AGENTS.md\n\n## Project overview\n\nWeb3j is a multi-module Java library for working with Ethereum and Ethereum-compatible clients from the JVM. This repository is primarily the SDK and code-generation surface, not a single end-user application.\n\nMajor modules in this repo:\n\n- `core`: main JSON-RPC client, transactions, credentials, ENS, contract base classes\n- `abi`: ABI encoding and decoding\n- `codegen`: wrapper generation logic and CLI entrypoints for generating Java/Kotlin wrappers\n- `crypto`: keys, wallets, signing, mnemonic helpers\n- `contracts`: reusable EIP contract support\n- `besu`: Besu-specific APIs, including privacy support\n- `eea`: EEA/private transaction support\n- `geth`, `parity`, `hosted-providers`, `rlp`, `tuples`, `utils`\n- `integration-tests`: JVM integration tests and privacy/network test fixtures\n\n## Setup commands\n\n- Build and run the default verification suite: `./gradlew check`\n- Run unit and module tests without integration tests: `./gradlew test`\n- Run only integration tests: `./gradlew -Pintegration-tests=true :integration-tests:test`\n- Explicitly disable integration tests: `./gradlew -Pintegration-tests=false :test`\n- Run a single test class: `./gradlew :integration-tests:test --tests org.web3j.protocol.scenarios.FunctionWrappersIT`\n- Run formatting checks: `./gradlew spotlessCheck`\n- Apply formatting: `./gradlew spotlessApply`\n\n## Environment and toolchain\n\n- Use Java 21 for current JVM dependency and build compatibility.\n- Gradle is the build system; prefer `./gradlew` over a system Gradle install.\n- Integration tests may require Docker images and credentials:\n  - `registry.username`\n  - `registry.password`\n- Some shared Gradle fragments are downloaded from `LFDT-web3j/web3j-build-tools` during build setup. Do not remove that behavior unless the task is specifically about build-tool bootstrapping.\n\n## Repo-specific coding guidance\n\n- Prefer modifying the smallest relevant module rather than spreading logic across modules.\n- Keep public API changes deliberate. Web3j is consumed as a library, so signature changes and behavior changes should be treated as compatibility-sensitive.\n- Follow existing Java style and license header conventions. Spotless is the source of truth for formatting.\n- Preserve existing separation between:\n  - generic Ethereum behavior in `core`\n  - client-specific behavior in `besu`, `geth`, `parity`\n  - privacy-specific behavior in `besu` and `eea`\n  - code generation behavior in `codegen`\n\n## Canonical code paths\n\nUse these files first when you need working examples:\n\n- `README.md`: published dependency coordinates, Java version note, high-level usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`: generated wrapper deploy/load/call flow\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SimpleStorageContractIT.java`: simple deploy/write/read wrapper usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`: generated ERC20 deploy, transfer, allowance, and event-flowable usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`: lower-level ERC20 deployment and ABI-driven interaction without wrappers\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`: lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`: ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`: block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`: manual `EthFilter` event filtering and log decoding\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`: local signing and raw transaction broadcast\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`: wallet creation and credential loading\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`: privacy groups and private transaction flows\n- `contracts/scripts/generateWrappers.sh`: wrapper-generation command shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java`: wrapper generation options and behavior\n\n## Library vs CLI boundary\n\nTreat Web3j as two separate surfaces:\n\n1. Java library APIs implemented in this repo\n2. Web3j CLI workflows documented externally\n\nWhen working in this repo:\n\n- Prefer library APIs for code examples inside Java applications.\n- Prefer generated wrappers before raw ABI or raw transaction examples.\n- For event listening, prefer generated wrapper `...EventFlowable(...)` helpers before manual log decoding.\n- Make it explicit when a user request refers to external CLI behavior such as:\n  - `web3j new`\n  - `web3j import`\n  - `web3j run`\n  - `web3j docker run`\n  - `web3j openapi new`\n  - `web3j openapi import`\n  - `web3j openapi jar`\n  - `web3j openapi generate`\n  - `web3j wallet create`\n  - `web3j wallet update`\n  - `web3j wallet send`\n  - `web3j audit`\n\nDo not claim those end-user CLI workflows are fully implemented in this repo unless you have verified the exact command path in local source.\n\nThe published `v5.0.3` docs also treat these as separately documented ecosystem surfaces rather than core repo modules:\n\n- `web3j_eth2_client`\n- `web3j_openapi`\n- `web3j_unit`\n- `web3j_evm`\n- `web3j_sokt`\n\n## Testing guidance\n\n- Default `test` does not include integration tests unless the `integration-tests` property enables them.\n- Prefer targeted tests for the module you changed before running full builds.\n- For transaction, wallet, wrapper, or privacy changes, add or update tests near existing scenario-style coverage instead of creating ad hoc examples elsewhere.\n- If you change code generation or wrappers, check whether `codegen` tests or generated test resources need to move with the change.\n\n## Security and correctness\n\n- Be careful with signing, nonce, gas, chain ID, and transaction-type behavior. Small changes can create silent downstream breakage.\n- Treat privacy-related changes in `besu` and `eea` as high-risk and validate against existing tests and flows.\n- Do not introduce hardcoded secrets, RPC credentials, or private keys outside existing test fixtures.\n- If modifying wallet or crypto code, prefer small, well-covered changes and preserve file format compatibility where possible.\n\n## Documentation and agent context\n\n- If you change user-facing usage patterns substantially, update `README.md` when appropriate.\n- This repo also contains AI-facing skill docs under `.agents/skills/web3j/`. If you materially change supported workflows or recommended usage, keep those references aligned.\n- Prefer `README.md` for released coordinates such as `org.web3j:core:5.0.3`, and use the published docs when the task is about companion tooling that is versioned or documented separately from the core SDK repo.\n- For AI-facing runnable examples, prefer reusing the starter assets under `.agents/skills/web3j/assets/` when they exist instead of rebuilding the same sample from scratch.\n- For AI-facing end-to-end ERC20 scaffolds, prefer `.agents/skills/web3j/assets/erc20-example/basic-erc20-app/` and `.agents/skills/web3j/references/erc20-example.md`.\n- For repo-contribution guidance, keep `.agents/skills/web3j/references/contributing.md` aligned with `CONTRIBUTING.md`, especially around issue triage, Discord-first feature proposals, PR expectations, and Spotless formatting.\n\n## Safe defaults for coding assistants\n\n- Start with `README.md`, `settings.gradle`, and the relevant module `build.gradle` before editing.\n- Search with `rg` instead of slower alternatives.\n- Prefer precise, minimal patches.\n- Run the narrowest relevant Gradle test task you can before finishing.\n"},"files":{".agents/skills/web3j/SKILL.md":"---\nname: web3j\ndescription: 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.\n---\n\n# Web3j\n\nThis skill is for AI agents helping users consume the Web3j library and CLI.\n\nTreat Web3j as two separate interfaces:\n\n- Java library usage inside application code\n- Web3j CLI usage from the shell\n\nDo 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.\n\n## Routing\n\n- For contributing to the Web3j library itself, including bug reports, fixes, feature proposals, formatting, PR expectations, and community discussion paths, read [references/contributing.md](references/contributing.md).\n- For project setup, dependency selection, module guidance, and \"how do I use this library\", read [references/getting-started.md](references/getting-started.md).\n- For end-to-end ERC20 examples that show how CLI scaffolding, wrapper generation, interaction, tests, and events fit together, read [references/erc20-example.md](references/erc20-example.md).\n- For event subscriptions, filters, flowables, WebSocket pub/sub, and runnable starter examples, read [references/events.md](references/events.md).\n- For smart contract wrapper generation, deployment, loading, calling, sending transactions, contract event subscriptions, and raw transaction fallbacks, read [references/smart-contracts.md](references/smart-contracts.md).\n- For `web3j new`, `web3j import`, `web3j run`, `web3j docker run`, `web3j wallet create`, `web3j wallet update`, `web3j wallet send`, `web3j audit`, and OpenAPI-oriented CLI scaffolding, read [references/cli.md](references/cli.md).\n- For Gradle and Maven plugin workflows, read [references/build-plugins.md](references/build-plugins.md).\n- For private transactions, Besu/EEA privacy APIs, and permissioned-network configuration context, read [references/privacy-permissioning.md](references/privacy-permissioning.md).\n- For transaction managers, signing, gas, nonces, EIP transaction types, wallet files, ETH transfers, generic log filters, and block/transaction flowables, read [references/transactions.md](references/transactions.md).\n- For the broader Web3j ecosystem tools named directly by the user, read:\n  - [references/web3j-eth2-client.md](references/web3j-eth2-client.md)\n  - [references/web3j-openapi.md](references/web3j-openapi.md)\n  - [references/web3j-unit.md](references/web3j-unit.md)\n  - [references/web3j-evm.md](references/web3j-evm.md)\n  - [references/web3j-sokt.md](references/web3j-sokt.md)\n\n## Repo-grounded examples\n\nWhen you need canonical implementation patterns, prefer these local sources:\n\n- `README.md` for published dependency coordinates, Java version expectations, and high-level positioning\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` for generated wrapper deploy/load/call patterns\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java` for lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java` for ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java` for block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java` for manual `EthFilter`-based event filtering and log decoding\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java` for wallet creation and credential loading APIs\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java` for local signing and raw transaction broadcast patterns\n- `integration-tests/build.gradle` for `web3j-unit` usage in this repo's test setup\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java` for private transaction and privacy group flows\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java` and `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java` for privacy APIs\n- `contracts/scripts/generateWrappers.sh` and `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` for wrapper-generation CLI shape\n\n## Working rules\n\n- Prefer concise, copyable answers.\n- Separate \"library code\" from \"CLI commands\" with explicit headings when both are relevant.\n- If the user asks to create a new project, first decide whether they mean:\n  - a CLI-scaffolded Web3j project\n  - a CLI import or generated-project workflow\n  - adding Web3j to an existing Maven or Gradle Java project\n- If the user asks how to contribute to Web3j itself, first decide whether they mean:\n  - report a bug\n  - submit a fix\n  - propose a feature\n  - ask a source-code question\n- For dependency coordinates and install steps, prefer official published usage from the docs and `README.md`.\n- For implementation details, prefer this repo's source and integration tests.\n- When showing smart contract usage, default to generated wrappers first and raw ABI / raw transaction flows second.\n- 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/`.\n- 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.\n- When answering audit questions, make clear that `web3j audit` is static analysis from the CLI toolchain, not a Java runtime API.\n- 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.\n- 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.\n",".agents/skills/web3j/assets/erc20-example/README.md":"# ERC20 Example Starters\n\nUse these starter assets when a user wants one example that shows how Web3j modules and companion tools fit together around an ERC20-like contract.\n\n## Templates\n\n- `basic-erc20-app/`\n  - minimal JVM-side app and test suite\n  - covers Solidity source, wrapper generation, deploy/load/call flow, typed events, and `@EVMTest`\n  - best answer for `show me a basic erc20 example`, `how do the web3j pieces fit together`, or `create a basic erc20 app`\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy `basic-erc20-app/` into the target directory\n2. keep the package names and wrapper package unless the user asks to rename them\n3. patch token metadata, endpoint defaults, or transfer env vars only if the user provided concrete values\n4. mention `web3j new` if they asked for a CLI-generated template\n5. mention `web3j_openapi` only if they want an HTTP layer on top of the same contract flow\n",".agents/skills/web3j/assets/erc20-example/basic-erc20-app/README.md":"# Basic ERC20 App\n\nThis starter is the shortest repo-grounded example that ties together:\n\n- Solidity source in `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- Web3j Unit `@EVMTest` coverage\n\nIt is intentionally a JVM-side starter, not a browser UI. If the user wants an HTTP layer, keep this contract/test flow and add `web3j_openapi` on top.\n\n## Files\n\n- `src/main/solidity/ExampleToken.sol`\n  - small ERC20-like contract with `Transfer` and `Approval` events\n- `src/main/java/example/Erc20ExampleApp.java`\n  - deploys the wrapper, reads token state, performs a transfer, and listens for `Transfer` events\n- `src/test/java/example/Erc20EvmTest.java`\n  - runs the same pattern under `@EVMTest`\n- `build.gradle`\n  - applies the Web3j Gradle plugin and fixes generated wrappers to `example.contracts`\n\n## Commands\n\nRun the test path:\n\n```sh\n./gradlew test\n```\n\nRun the deploy/interact/event path:\n\n```sh\nWEB3J_PRIVATE_KEY=0xyourprivatekey ./gradlew run\n```\n\n## Environment variables\n\n- `WEB3J_HTTP_URL`\n  - defaults to `http://localhost:8545`\n- `WEB3J_PRIVATE_KEY`\n  - required for `run`\n- `WEB3J_TOKEN_NAME`\n  - defaults to `Skill Token`\n- `WEB3J_TOKEN_SYMBOL`\n  - defaults to `SKILL`\n- `WEB3J_INITIAL_SUPPLY`\n  - defaults to `1000000`\n- `WEB3J_TRANSFER_TO`\n  - defaults to the deployer address so the transfer path can run without a second account\n- `WEB3J_TRANSFER_AMOUNT`\n  - defaults to `1`\n\n## How companion tools fit\n\nCLI scaffolding:\n\n- the published CLI docs already expose `web3j new`, and `erc20` is one of the documented templates\n\nWeb3j Sokt:\n\n- the published `v5.0.3` docs position Sokt as the direct compiler-resolution and native `solc` helper\n- the docs-backed shape is `SolidityFile -> getCompilerInstance() -> execute(...)`\n- this starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and leaves direct Sokt wiring as a follow-on step when the user asks for compiler-management code specifically\n\nWeb3j Unit and Web3j EVM:\n\n- `Erc20EvmTest` shows the concrete `@EVMTest` flow documented for Web3j Unit\n- when a user asks about `web3j-unit` or `web3j-evm`, point them to the test first because it is the most directly runnable path in this starter\n",".agents/skills/web3j/assets/event-subscriptions/README.md":"# Event Subscription Starters\n\nUse these starter projects when a user asks for a runnable Web3j event-listening example.\n\n## Templates\n\n- `websocket-newheads/`\n  - subscribes to new block headers over WebSocket\n  - best default runnable example\n- `contract-logs/`\n  - subscribes to contract logs with `EthFilter`\n  - best when the user already has a contract address and event topic\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy the closest starter into the target directory\n2. rename the package or project only if the user cares\n3. patch the env-var defaults if the user gave a concrete endpoint or contract\n4. explain the exact env vars required to run it\n\n## Runtime expectations\n\nThese templates are minimal Gradle Java apps.\n\nTypical run commands:\n\n```sh\ngradle run\n```\n\nor, if the target project has a wrapper:\n\n```sh\n./gradlew run\n```\n\n## Environment variables\n\n### `websocket-newheads`\n\n- `WEB3J_WS_URL`\n\n### `contract-logs`\n\n- `WEB3J_HTTP_URL`\n- `WEB3J_CONTRACT_ADDRESS`\n- `WEB3J_EVENT_TOPIC0` optional\n",".agents/skills/web3j/references/build-plugins.md":"# Build Plugins\n\nUse this file for prompts like:\n\n- `how do i use the web3j gradle plugin`\n- `how do i use the web3j maven plugin`\n- `generate wrappers during build`\n- `what build plugins does web3j have`\n\n## Scope\n\nWeb3j has companion build plugins outside this repo's main Java library modules.\n\nThe main plugin surfaces documented by the official docs sitemap are:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThe root `README.md` also points users to:\n\n- `web3j-maven-plugin`\n- `web3j-gradle-plugin`\n\nUse these when the user wants code generation integrated into a build rather than run manually from the CLI.\n\nThe `v5.0.3` docs also document generated-project build tasks around the CLI and OpenAPI flows. Treat those as generated-project tasks, not as proof that every task is a generic plugin feature.\n\n## When to recommend plugins\n\nPrefer a build plugin when the user wants:\n\n- contract wrapper generation as part of `build`, `compile`, or codegen phases\n- reproducible ABI/BIN-to-wrapper generation in CI\n- less manual `solc` plus CLI orchestration\n\nPrefer direct CLI commands when the user wants:\n\n- a one-off wrapper generation\n- exploration or debugging\n- minimal setup\n\n## Practical guidance\n\nThe functional goal of these plugins is the same as the CLI wrapper flow:\n\n1. compile Solidity or consume ABI/BIN artifacts\n2. generate Java wrappers\n3. place generated sources under the project source tree or generated-sources area\n\nIf the user already has a Gradle or Maven project, recommend the plugin that matches their build tool first.\n\nIf the user is not tied to a build tool yet, the CLI path is simpler to explain and is covered in `references/smart-contracts.md`.\n\nFor generated OpenAPI projects, the documented Gradle tasks include:\n\n- `generateContractWrappers`\n- `generateWeb3jOpenApi`\n- `generateWeb3jSwaggerUi`\n\nUse those only in the context of the generated project layout shown by the CLI/OpenAPI docs.\n\n## Repo-grounded context\n\nThis repo does not contain the plugin implementations themselves. It does contain the underlying code-generation logic and examples:\n\n- `README.md` links the Maven and Gradle plugins\n- `contracts/scripts/generateWrappers.sh` shows the CLI-based generation shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` shows the supported wrapper-generation inputs\n\n## Prompt-oriented answers\n\n### `what build plugins does web3j have`\n\nAnswer with:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThen ask whether the user wants:\n\n- wrappers generated during Gradle builds\n- wrappers generated during Maven builds\n- a one-off CLI alternative\n\n### `generate wrappers during build`\n\nDefault answer shape:\n\n1. identify the user's build tool\n2. recommend the matching Web3j plugin\n3. explain that it automates the same ABI/BIN-to-wrapper flow as `web3j generate solidity`\n4. if exact plugin DSL is needed, consult the plugin docs or plugin repo because that configuration lives outside this repo\n\n### `how do i generate openapi outputs during build`\n\nDefault answer shape:\n\n1. clarify whether they mean a CLI-generated OpenAPI project or a normal Gradle/Maven build\n2. if it is the generated project, point to the documented generated Gradle tasks\n3. if they want generic build-plugin DSL, do not invent it from this repo alone\n",".agents/skills/web3j/references/cli.md":"# Web3j CLI\n\nUse this file for prompts like:\n\n- `create a new project`\n- `import this project with web3j`\n- `audit this contract with web3j`\n- `create a wallet`\n- `run this generated project`\n- `generate an openapi service with web3j`\n- `send ether with the web3j cli`\n\nThis file is about the external Web3j CLI. Do not present these commands as Java library APIs.\n\n## Core commands\n\nProject scaffold:\n\n```sh\nweb3j new\n```\n\nImport a project into a CLI-managed Web3j layout:\n\n```sh\nweb3j import\n```\n\nOpenAPI project generation and packaging:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\nRun a generated project locally:\n\n```sh\nweb3j run\n```\n\nRun a generated project in Docker:\n\n```sh\nweb3j docker run [-l] <network> <wallet_path> <wallet_password>\n```\n\nCreate a wallet:\n\n```sh\nweb3j wallet create\n```\n\nUpdate a wallet password:\n\n```sh\nweb3j wallet update <walletfile>\n```\n\nSend ETH from a wallet:\n\n```sh\nweb3j wallet send <walletfile> 0x<address>|<ensName>\n```\n\nAudit a Solidity contract:\n\n```sh\nweb3j audit Campaign.sol\n```\n\nGenerate unit tests from generated wrappers:\n\n```sh\nweb3j generate tests\n```\n\n## Interpretation rules\n\n- `web3j audit` is static Solidity analysis from the CLI toolchain.\n- It is not a runtime Java API in this repo.\n- `web3j new`, `web3j import`, `web3j run`, and `web3j docker run` are shell workflows around generated projects.\n- `web3j openapi ...` commands are CLI workflows for generating or packaging OpenAPI-oriented projects, not core `org.web3j:core` APIs.\n- `wallet create`, `wallet update`, and `wallet send` are shell workflows.\n- If the user wants wallet creation inside Java code instead of the CLI, route them to `WalletUtils.generateBip39Wallet(...)`, `WalletUtils.generateNewWalletFile(...)`, or credential-loading APIs in the library.\n\nThe `v5.0.3` docs also show that `web3j new` supports named templates such as `helloworld`, `erc20`, and `erc777`, and a Kotlin option. Prefer mentioning those capabilities at a high level unless the user asks for the exact interactive flow.\n\n## Library counterpart for wallet tasks\n\nIf the user asks for Java code instead of CLI:\n\n- create encrypted wallet file:\n  - `WalletUtils.generateNewWalletFile(...)`\n  - `WalletUtils.generateLightNewWalletFile(...)`\n  - `WalletUtils.generateFullNewWalletFile(...)`\n- create BIP-39 wallet:\n  - `WalletUtils.generateBip39Wallet(...)`\n- load credentials:\n  - `WalletUtils.loadCredentials(...)`\n  - `WalletUtils.loadBip39Credentials(...)`\n\nRepo grounding:\n\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`\n\n## Generated-project runtime configuration\n\nThe `v5.0.3` CLI docs expose these environment variables for generated projects:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_PRIVATE_KEY`\n\nFor generated OpenAPI projects, the docs also show:\n\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n\nWhen the user asks how to run the generated project, prefer these generated-project Gradle tasks from the CLI docs:\n\n- `./gradlew build`\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n- `./gradlew clean`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user is asking from a terminal-user perspective, answer with:\n\n```sh\nweb3j new\n```\n\nThen mention:\n\n- `web3j new` is for a CLI scaffold\n- `web3j import` is for bringing an existing project into the generated-project workflow\n- adding `org.web3j:core` to an existing Java project is covered in `references/getting-started.md`\n\n### `audit this contract with web3j`\n\nDefault answer:\n\n```sh\nweb3j audit MyContract.sol\n```\n\nClarify:\n\n- this performs static analysis on Solidity source\n- output includes issue location, severity, description, and rule identifier\n- it is useful before deployment, not after a contract is already on-chain\n\n### `create a wallet`\n\nDefault terminal answer:\n\n```sh\nweb3j wallet create\n```\n\nIf the user wants code instead, switch to the Java wallet APIs from `WalletUtils`.\n\n### `run this generated project`\n\nDefault terminal answer:\n\n```sh\nweb3j run\n```\n\nThen mention the generated-project environment variables or the generated Gradle tasks if they need wrapper regeneration or OpenAPI output first.\n\n### `generate an openapi service with web3j`\n\nDefault CLI answer:\n\n```sh\nweb3j openapi new\n```\n\nIf the user wants runtime configuration, generated JAR packaging, or the Kotlin client surface, route them to `references/web3j-openapi.md`.\n",".agents/skills/web3j/references/contributing.md":"# Contributing\n\nUse this file for prompts like:\n\n- `how do i contribute to web3j`\n- `i found a bug in web3j`\n- `how should i submit a fix`\n- `i want to add a feature to web3j`\n- `where should i ask questions about the source code`\n\n## Scope\n\nThis file is for contributing to the Web3j library and repo itself, not for using Web3j as a dependency in an application.\n\nPrimary repo grounding:\n\n- `CONTRIBUTING.md`\n- `AGENTS.md`\n- `README.md`\n\n## Community entry points\n\nThe repo's contribution guidance highlights these community channels:\n\n- the Hyperledger Web3j community page\n- the recurring Web3j contributor call\n- the Web3j Discord channel under the Hyperledger server\n\nIf the user cannot access the Web3j Discord channel directly, the repo guidance says to join the Hyperledger Discord server first and then use the Web3j channel.\n\n## Bug reports\n\nIf the user found a bug:\n\n1. search existing GitHub issues first\n2. if an issue already exists, add useful details or signal support there\n3. if not, open a new issue with:\n   - a clear title\n   - a clear description\n   - relevant context\n   - a code sample, or preferably an executable test case\n\nBest contributor guidance:\n\n- prefer a reproducer over a vague narrative\n- if the user is already in the repo, suggest placing the reproducer near the relevant module or scenario-style tests\n\n## Bug fixes and patches\n\nIf the user already wrote a fix:\n\n1. open a pull request\n2. clearly describe the problem and the solution\n3. link the related issue when applicable\n4. run Spotless formatting before pushing\n\nRequired repo-specific reminder:\n\n```sh\n./gradlew spotlessApply\n```\n\nThe contribution guide explicitly warns that the build can fail if formatting is not applied.\n\nPair that with the repo's normal validation guidance:\n\n- run the narrowest relevant Gradle test task first\n- expand to broader validation only when needed\n\n## New features or behavior changes\n\nThe contribution guide treats feature work differently from bug fixes.\n\nIf the user wants to add a feature or make a behavior change:\n\n1. discuss the idea on Discord first\n2. wait for positive feedback\n3. only then move toward implementation and PR work\n\nImportant boundary from the repo guide:\n\n- do not open a GitHub issue first for speculative feature proposals\n- GitHub issues are mainly for bug reports and fixes\n\n## Source-code questions\n\nIf the user is asking how the source works or where to discuss implementation ideas:\n\n- direct them to the Web3j Discord channel\n- keep GitHub issues focused on actionable bugs/fixes unless maintainers ask otherwise\n\n## Contribution-ready workflow\n\nWhen an agent is helping with a contribution, the safest default flow is:\n\n1. identify whether it is a bug, patch, feature proposal, or source-code question\n2. if bug:\n   - search issues\n   - build a reproducer or executable test\n3. if fix:\n   - make the minimal patch\n   - run `./gradlew spotlessApply`\n   - run narrow tests\n   - open a PR with issue context\n4. if feature:\n   - prepare a short proposal\n   - direct the user to Discord first\n\n## Prompt-oriented answers\n\n### `i found a bug in web3j`\n\nDefault answer:\n\n1. search GitHub issues first\n2. if nothing matches, open a new issue\n3. include a minimal code sample or, ideally, an executable test case\n4. if they want help reproducing it, build that test in the relevant module\n\n### `how should i submit a fix`\n\nDefault answer:\n\n1. make the patch\n2. run:\n\n```sh\n./gradlew spotlessApply\n```\n\n3. run the narrowest relevant tests\n4. open a PR describing the problem and solution\n5. include the issue number if one exists\n\n### `i want to add a feature to web3j`\n\nDefault answer:\n\n1. discuss it on Discord first\n2. wait for positive feedback\n3. then start implementation\n\nDo not default to \"open a GitHub issue first\" for feature ideas, because that conflicts with the repo guidance.\n",".agents/skills/web3j/references/erc20-example.md":"# ERC20 Example\n\nUse this file for prompts like:\n\n- `show me a basic erc20 example with web3j`\n- `create a basic erc20 web app`\n- `how do the web3j pieces fit together`\n- `show me wrappers tests and events in one example`\n- `scaffold an erc20 project with web3j`\n\n## Decision rule\n\nDecide which of these the user actually needs:\n\n1. a CLI-generated starter such as `web3j new` with the `erc20` template\n2. a repo-grounded end-to-end example that an agent can copy and adapt quickly\n3. an actual HTTP or OpenAPI surface on top of contract logic\n\nIf they want the shortest runnable example that also shows tests and events, prefer the local starter asset.\n\n## Default starter\n\nUse:\n\n- `assets/erc20-example/basic-erc20-app/`\n\nThis is the default answer for an AI agent when the user wants one example that ties together:\n\n- Solidity source under `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- `@EVMTest`-based contract testing\n\n## What this starter covers\n\nThe starter is intentionally wrapper-first and repo-grounded.\n\nIt shows:\n\n1. an ERC20-like contract with `Transfer` and `Approval` events\n2. generated wrappers placed in a fixed package for stable imports\n3. a small JVM app that deploys the contract, reads state, sends a transfer, and listens for `Transfer` events\n4. a JUnit test using `@EVMTest` to exercise the same flow\n\nRepo grounding for the pattern:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## CLI and web-surface routing\n\nIf the user asks from a terminal-user perspective, mention that the official CLI docs already expose:\n\n```sh\nweb3j new\n```\n\nand that the published templates include `erc20`.\n\nIf the user truly wants an HTTP or browser-facing layer, this starter is still the right contract and test baseline, but route them onward to:\n\n- `references/web3j-openapi.md`\n\nfor the generated web surface.\n\n## Sokt boundary\n\nThe published `v5.0.3` docs show `web3j-sokt` as a companion compiler-wrapper library that works around:\n\n- `SolidityFile`\n- `getCompilerInstance()`\n- `SolcArguments`\n- `execute(...)`\n\nUse `references/web3j-sokt.md` when the user explicitly wants direct compiler-resolution or native `solc` invocation from code.\n\nThe local ERC20 starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and treats Sokt as the companion compilation surface rather than guessing extra local integration code.\n\n## Prompt-oriented answers\n\n### `show me a basic erc20 example with web3j`\n\nDefault answer:\n\n1. copy `assets/erc20-example/basic-erc20-app/`\n2. run `./gradlew test` for the `@EVMTest` flow\n3. run `WEB3J_PRIVATE_KEY=... ./gradlew run` for the deploy/call/event flow\n4. adapt token name, symbol, endpoint, and transfer defaults as needed\n\n### `create a basic erc20 web app`\n\nDefault answer:\n\n1. start from `assets/erc20-example/basic-erc20-app/` for the contract, wrappers, tests, and events\n2. if they mean CLI scaffolding, mention `web3j new` with the `erc20` template\n3. if they mean an HTTP layer, extend the same contract flow with `references/web3j-openapi.md`\n\n### `how do the web3j pieces fit together`\n\nDefault answer:\n\n1. Solidity contract source defines the ERC20 behavior\n2. the Web3j Gradle plugin generates wrappers\n3. the Java app deploys and calls the wrapper\n4. event flowables provide typed subscriptions\n5. Web3j Unit drives the `@EVMTest` contract test\n",".agents/skills/web3j/references/events.md":"# Events\n\nUse this file for prompts like:\n\n- `how do i subscribe to events with web3j`\n- `how do i subscribe to contract events with web3j`\n- `how do i watch new blocks with web3j`\n- `how do i use flowables with web3j`\n- `scaffold me a runnable event-listener example`\n- `show me a full contract example with events`\n\n## Decision rule\n\nDecide which event-listening path the user actually needs:\n\n1. contract events from a deployed contract with generated wrappers\n2. generic contract logs without wrappers\n3. node-level events such as new heads or pending transactions\n4. replaying past blocks or transactions\n\nIf the user asks for a runnable starter, prefer the closest asset under `../assets/event-subscriptions/`.\n\n## Default recommendations\n\nPrefer these paths in order:\n\n1. generated wrapper `...EventFlowable(...)` helpers for contract events\n2. `EthFilter` plus `web3j.ethLogFlowable(filter)` for generic logs\n3. `WebSocketService` plus `web3j.newHeadsNotifications()` or other Web3j flowables for push subscriptions\n\nAlways dispose the subscription when it is no longer needed.\n\n## Runnable starter assets\n\nUse these templates when the user wants a quick scaffold:\n\n- `assets/event-subscriptions/websocket-newheads/`\n  - immediate runnable example for `newHeads` subscriptions over WebSocket\n  - best answer for \"watch new blocks\", \"subscribe to new heads\", or \"show me a running example\"\n- `assets/event-subscriptions/contract-logs/`\n  - runnable generic contract-log listener using `EthFilter`\n  - best answer when the user has a contract address and event signature/topic but no generated wrapper yet\n- `assets/erc20-example/basic-erc20-app/`\n  - end-to-end contract example with wrapper generation, deploy/load/call flow, `@EVMTest`, and typed `Transfer` event subscriptions\n  - best answer when the user wants event listening as part of a fuller smart-contract workflow instead of a bare listener\n\nWhen adapting these assets, copy the nearest template and then only patch:\n\n- project name\n- package name if needed\n- endpoint defaults\n- contract address / topic env vars\n- token metadata or transfer defaults for the ERC20 starter\n\n## Wrapper-based contract events\n\nIf the user already has a generated wrapper, prefer this path:\n\n1. load the contract wrapper\n2. call `...EventFlowable(startBlock, endBlock)` or `...EventFlowable(filter)`\n3. subscribe to the returned RxJava `Flowable`\n4. dispose the subscription on shutdown\n\nRoute to `references/smart-contracts.md` for the wrapper-specific pattern.\nRoute to `references/erc20-example.md` when the user wants the event subscription embedded in a runnable deploy/interact example.\n\n## Generic logs with EthFilter\n\nIf the user does not have wrappers, use:\n\n1. `EthFilter` for block range and address\n2. `addSingleTopic(...)` or optional topics when needed\n3. `web3j.ethLogFlowable(filter)`\n4. raw log printing or manual decoding\n\nImportant notes from the docs:\n\n- filters work on indexed topics\n- omitting topics broadens the subscription\n- the docs note that filters are not supported on Infura\n\nRoute to `references/transactions.md` for lower-level filter details.\n\n## WebSocket pub/sub\n\nIf the user wants push subscriptions instead of polling:\n\n1. create `WebSocketService`\n2. connect it\n3. build `Web3j` from that service\n4. subscribe via `newHeadsNotifications()` or other flowables\n\nUse the `websocket-newheads` asset as the default runnable starter.\n\n## Repo grounding\n\nBest local sources:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\n## Prompt-oriented answers\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n1. if it is a contract event and wrappers exist, use the generated `...EventFlowable(...)` helper\n2. otherwise use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n3. for node-level push subscriptions such as new heads, use `WebSocketService`\n4. if they want a runnable starter, scaffold from `assets/event-subscriptions/`\n\n### `scaffold me a runnable event-listener example`\n\nDefault choice:\n\n- use `assets/event-subscriptions/websocket-newheads/` unless the user explicitly asks for contract logs\n- use `assets/event-subscriptions/contract-logs/` when they already have a contract address and topic or event signature\n- use `assets/erc20-example/basic-erc20-app/` when they want the event subscription to live inside a complete smart-contract example\n",".agents/skills/web3j/references/getting-started.md":"# Getting Started\n\nUse this file for prompts like:\n\n- `create a new project`\n- `how do i use this library`\n- `add web3j to my java project`\n- `what module do i need`\n\n## Decision rule\n\nDecide which of these the user means:\n\n1. A brand new Web3j project scaffold from the CLI\n2. Importing or generating a CLI-managed Web3j project\n3. Adding Web3j to an existing Java project\n4. Understanding which modules and APIs to use\n\nIf the prompt is ambiguous, prefer the narrowest useful answer and mention the alternate path briefly.\n\n## New project via CLI\n\nFor a brand new project scaffold, use the Web3j CLI:\n\n```sh\nweb3j new\n```\n\nThe `v5.0.3` CLI docs show this as the project-generation entry point for Java or Kotlin scaffolds, including templates such as `helloworld`, `erc20`, and `erc777`.\n\nThis is a CLI workflow, not an in-repo Java API.\n\nIf the user is clearly asking about importing an existing contract-driven project into a generated Web3j layout, route them to the CLI workflow instead:\n\n```sh\nweb3j import\n```\n\nIf the user asks how to install the CLI first, point them to the official Web3j command-line tools docs and the project `README.md`.\n\n## Add Web3j to an existing Java project\n\nThe main dependency for standard JVM usage is `org.web3j:core`.\n\nExample Maven dependency from the repo `README.md`:\n\n```xml\n<dependency>\n  <groupId>org.web3j</groupId>\n  <artifactId>core</artifactId>\n  <version>5.0.3</version>\n</dependency>\n```\n\nExample Gradle dependency from the repo `README.md`:\n\n```groovy\nimplementation('org.web3j:core:5.0.3')\n```\n\nImportant:\n\n- The repo currently documents Java 21 for current Java binaries.\n- This repo itself is at `5.0.3-SNAPSHOT`, so if the user needs a released version, prefer the published coordinates from the docs or `README.md` rather than guessing from local snapshot state.\n- If the user is asking for OpenAPI server generation rather than a normal JVM app dependency, route them to `references/web3j-openapi.md`.\n\n## Module guidance\n\nDefault module choices:\n\n- `core`: primary JVM entry point for JSON-RPC, credentials, transactions, contract wrappers, ENS, and common Ethereum workflows\n- `abi`: low-level ABI encoding and decoding\n- `codegen`: wrapper generation utilities\n- `crypto`: key, wallet, and signing primitives\n- `contracts`: reusable EIP contract support\n- `besu`, `geth`, `parity`, `eea`: client-specific or protocol-specific surfaces\n\nRecommend `core` unless the user has a specific low-level need.\n\n## Minimal library usage pattern\n\nFor a basic Java integration, the common flow is:\n\n1. Create a `Web3j` client\n2. Load `Credentials`\n3. Use JSON-RPC APIs directly or use generated contract wrappers\n\nExample:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\n```\n\nFrom there:\n\n- for smart contracts, route to `references/smart-contracts.md`\n- for wallet CLI tasks, route to `references/cli.md`\n- for OpenAPI-generated services, route to `references/web3j-openapi.md`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user wants a Web3j scaffold:\n\n```sh\nweb3j new\n```\n\nIf they mean \"import or generate a CLI-managed project from existing artifacts\", route them to:\n\n```sh\nweb3j import\n```\n\nIf they mean \"add Web3j to my existing app\", give the `core` dependency and a minimal `Web3j.build(...)` example instead.\n\n### `how do i use this library`\n\nGive this structure:\n\n1. Add `org.web3j:core`\n2. Create a `Web3j` client\n3. Load credentials or connect read-only\n4. Use JSON-RPC directly or generate contract wrappers\n\nPoint contract questions to `references/smart-contracts.md`.\n",".agents/skills/web3j/references/privacy-permissioning.md":"# Privacy And Permissioning\n\nUse this file for prompts like:\n\n- `how do i use privacy with web3j`\n- `how do i send a private transaction with besu`\n- `how do privacy groups work`\n- `what about permissioning in a besu network`\n\n## Scope\n\nThe published `v5.0.3` docs group these topics under `Privacy & Permissioning`.\n\nIn this repo, privacy support is strongly represented by:\n\n- the `besu` module\n- the `eea` module\n- privacy-focused integration tests under `integration-tests`\n\nPermissioning is not exposed as a first-class Java helper surface in the same way privacy is, but the integration-test network configuration shows how permissioned Besu nodes are configured in practice.\n\n## Primary Java surfaces\n\nFor Besu privacy:\n\n- `org.web3j.tx.PrivateTransactionManager`\n- `org.web3j.tx.BesuPrivateTransactionManager`\n- `org.web3j.tx.LegacyPrivateTransactionManager`\n- `org.web3j.tx.gas.BesuPrivacyGasProvider`\n- `org.web3j.protocol.besu.Besu`\n- `org.web3j.protocol.besu.response.privacy.*`\n\nFor EEA/private transaction encoding:\n\n- `org.web3j.protocol.eea.Eea`\n- `org.web3j.protocol.eea.crypto.RawPrivateTransaction`\n- `org.web3j.protocol.eea.crypto.PrivateTransactionEncoder`\n- `org.web3j.utils.Base64String`\n- `org.web3j.utils.Restriction`\n\n## Recommended starting point\n\nIf the user wants application-level private transactions on Besu, start from:\n\n- a `Besu` client\n- enclave public keys / privacy participants\n- a `PrivateTransactionManager`\n- either a generated wrapper or a manually built `RawPrivateTransaction`\n\nThe `v5.0.3` docs also show on-chain privacy-group management and private smart-contract flows as first-class privacy tasks.\n\n## Repo-grounded examples\n\nStrongest examples:\n\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/PrivateTransactionEncoder.java`\n- `besu/src/main/java/org/web3j/protocol/besu/Besu.java`\n\nThe privacy quickstart test demonstrates:\n\n1. creating or retrieving a privacy group\n2. building a private contract deployment transaction\n3. signing it with `PrivateTransactionEncoder`\n4. sending it with `eeaSendRawTransaction`\n5. retrieving a private receipt\n6. using `PrivateTransactionManager` with generated wrappers\n\nThe `v5.0.3` privacy docs also show privacy-group operations such as:\n\n- `privOnChainCreatePrivacyGroup(...)`\n- `privOnChainFindPrivacyGroup(...)`\n- `privOnChainAddToPrivacyGroup(...)`\n- `privOnChainRemoveFromPrivacyGroup(...)`\n\nAnd they show private contract interaction through:\n\n- `BesuPrivateTransactionManager`\n- generated wrappers loaded or deployed against a privacy group\n\n## Permissioning context\n\nFor permissioned Besu network configuration, inspect:\n\n- `integration-tests/src/test/resources/quorum-test-network/config/besu/config.toml`\n\nThis test setup shows node-permissioning configuration such as:\n\n- `permissions-nodes-config-file-enabled=true`\n- a configured permissions file path\n\nUse this as environment context, not as proof of a higher-level Web3j Java abstraction for permissioning.\n\n## Prompt-oriented answers\n\n### `how do i send a private transaction with besu`\n\nDefault answer shape:\n\n1. connect with a `Besu` client\n2. create or identify the target privacy group if needed\n3. construct a `PrivateTransactionManager` or `RawPrivateTransaction`\n4. supply enclave keys / privacy group details\n5. sign using privacy-specific encoding\n6. send and wait for a private receipt\n\nIf the user wants private smart-contract deployment, prefer the wrapper-based `BesuPrivateTransactionManager` flow after the privacy group is ready.\n\n### `how do privacy groups work`\n\nDefault answer shape:\n\n1. privacy groups define which participants can view the private state and transactions\n2. use the Besu privacy APIs to create, find, add members, or remove members\n3. once the group exists, deploy or load contracts against that group with a private transaction manager\n\n### `what about permissioning`\n\nClarify:\n\n- privacy and permissioning are related but different concerns\n- this repo provides substantial privacy APIs\n- permissioning is more visible here as Besu node/network configuration context than as a dedicated convenience layer\n\nUse the local Besu config under `integration-tests` as environment grounding, not as proof of a high-level Web3j permissioning API.\n",".agents/skills/web3j/references/smart-contracts.md":"# Smart Contracts\n\nUse this file for prompts like:\n\n- `how do i deploy & interact with smart contracts`\n- `using web3j, deploy a contract & call a function`\n- `generate wrappers for this solidity contract`\n- `call this contract method with web3j`\n- `how do i subscribe to contract events with web3j`\n\nPrefer generated wrappers first. Use raw transaction and ABI flows only when the user explicitly wants lower-level control or does not have generated wrappers.\n\n## Wrapper generation\n\nThe standard flow is:\n\n1. Compile Solidity to `.bin` and `.abi`\n2. Generate Java wrappers\n3. Use the generated class for deploy, load, call, and transact\n\nCompile with `solc`:\n\n```sh\nsolc MyContract.sol --bin --abi --optimize -o build/\n```\n\nGenerate wrappers with the Web3j CLI:\n\n```sh\nweb3j generate solidity \\\n  -b build/MyContract.bin \\\n  -a build/MyContract.abi \\\n  -o src/main/java \\\n  -p com.example.contracts\n```\n\nRepo grounding:\n\n- `contracts/scripts/generateWrappers.sh` uses the same general flow\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` confirms the supported arguments, including `-a`, `-b`, `-o`, `-p`, `-c`, `-B`, and `-r`\n\n## Recommended deploy/load pattern\n\nUse a `Web3j` client, load `Credentials`, and supply a `ContractGasProvider`.\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n```\n\nDeploy with a generated wrapper:\n\n```java\nMyContract contract = MyContract.deploy(\n        web3j,\n        credentials,\n        gasProvider\n).send();\n```\n\nLoad an existing deployment:\n\n```java\nMyContract contract = MyContract.load(\n        \"0xYourContractAddress\",\n        web3j,\n        credentials,\n        gasProvider\n);\n```\n\n## Call vs transact\n\nRead-only call:\n\n```java\nBigInteger value = contract.get().send();\n```\n\nState-changing transaction:\n\n```java\nTransactionReceipt receipt = contract.set(BigInteger.valueOf(1000)).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SimpleStorageContractIT.java` shows deploy, `set(...)`, and `get()`\n- `integration-tests/.../FunctionWrappersIT.java` shows deploy, load, return-value calls, and event extraction\n\n## Subscribe to contract events\n\nFor smart-contract event listening, prefer generated wrapper flowables before building raw log filters yourself.\n\nGenerated wrappers expose event helpers shaped like:\n\n- `transferEventFlowable(EthFilter filter)`\n- `transferEventFlowable(startBlock, endBlock)`\n\nThe generator code in this repo confirms that wrapper generation emits `...EventFlowable(...)` methods backed by `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nDisposable subscription =\n        myContract.someEventFlowable(\n                        DefaultBlockParameterName.EARLIEST,\n                        DefaultBlockParameterName.LATEST)\n                .subscribe(event -> {\n                    // use typed event fields from the generated response\n                });\n```\n\nIf you need tighter filtering, build the filter yourself and pass it to the wrapper:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                myContract.getContractAddress());\n\nDisposable subscription =\n        myContract.someEventFlowable(filter)\n                .subscribe(event -> {\n                    // handle event\n                });\n```\n\nAlways dispose the subscription when you no longer need it.\n\nRepo grounding:\n\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\nIf the user wants a single runnable example that combines wrapper generation, deployment, calls, tests, and event subscriptions, route them to `references/erc20-example.md` and the starter asset under `assets/erc20-example/basic-erc20-app/`.\n\n## Lower-level raw deployment and ABI calls\n\nUse this when the user wants raw JSON-RPC style control or no wrapper exists.\n\nKey pieces:\n\n- `RawTransaction.createContractTransaction(...)` for deployment\n- `TransactionEncoder.signMessage(...)` for signing\n- `FunctionEncoder.encode(...)` for ABI-encoding a function call\n- `ethCall(...)` for read-only execution\n- `ethSendRawTransaction(...)` for signed writes\n\nRepo grounding:\n\n- `integration-tests/.../DeployContractIT.java` shows raw contract deployment and a follow-up ABI-encoded function call\n\n## ETH transfer alongside contract work\n\nIf the user also needs to fund an account or send ETH, prefer:\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SendEtherIT.java`\n\n## Prompt-oriented answers\n\n### `how do i deploy & interact with smart contracts`\n\nAnswer with:\n\n1. Compile Solidity to ABI and BIN\n2. Generate wrappers with `web3j generate solidity`\n3. Load `Web3j`, `Credentials`, and a gas provider\n4. `MyContract.deploy(...).send()`\n5. `MyContract.load(...)`\n6. Call read methods with `.send()`\n7. Send write methods with `.send()` and inspect `TransactionReceipt`\n\n### `using web3j, deploy a contract & call a function`\n\nDefault example shape:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\"password\", \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n\nMyContract contract = MyContract.deploy(web3j, credentials, gasProvider).send();\nBigInteger result = contract.someViewMethod(BigInteger.TEN).send();\n```\n\nIf the user explicitly says they do not want wrapper generation, switch to the raw deployment and ABI-call pattern from `DeployContractIT`.\n\n### `how do i subscribe to contract events with web3j`\n\nDefault answer shape:\n\n1. generate or use the contract wrapper\n2. load the deployed contract\n3. call the generated `...EventFlowable(...)` helper\n4. subscribe to the returned RxJava `Flowable`\n5. dispose the subscription when done\n\nIf the user does not have wrappers, switch to the lower-level `EthFilter` plus `web3j.ethLogFlowable(...)` pattern from `references/transactions.md`.\n",".agents/skills/web3j/references/transactions.md":"# Transactions\n\nUse this file for prompts like:\n\n- `how do transactions work in web3j`\n- `how do i sign and send a transaction`\n- `how do i use eip-1559`\n- `how do i transfer ether`\n- `how do i handle nonces and gas`\n- `how do logs fit into transactions`\n- `how do i subscribe to events with web3j`\n- `what about wallet files`\n- `what about eip-7702`\n\n## Core transaction surfaces\n\nThe main transaction abstractions in this repo are:\n\n- `TransactionManager`\n- `RawTransactionManager`\n- `ClientTransactionManager`\n- `ReadonlyTransactionManager`\n- `Transfer`\n- `RawTransaction`\n- `TransactionEncoder`\n\nThe strongest repo-grounded file for local signing and send flow is:\n\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`\n\n## Default recommendation\n\nChoose the simplest abstraction that fits:\n\n1. `Transfer.sendFunds(...)` for basic ETH transfers\n2. generated contract wrappers for contract creation, calls, and writes\n3. `RawTransactionManager` for locally signed general-purpose transactions\n4. manual `RawTransaction` plus encoder flow for low-level control\n\nThe `v5.0.3` docs explicitly separate transaction topics into:\n\n- Ether transfer\n- Smart contract creation and contract interaction\n- Wallet files and credentials\n- Logs and events\n- EIP transaction types, including `EIP-1559`, `EIP-2930`, `EIP-4844`, and `EIP-7702`\n\n## Common patterns\n\n### ETH transfer\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n### Local signing and broadcast\n\n`RawTransactionManager`:\n\n- fetches the pending nonce\n- signs locally\n- sends via `ethSendRawTransaction`\n- verifies local and remote tx hashes\n\nUse it when the user wants explicit signing control without manually assembling every JSON-RPC call.\n\n### Manual raw transaction flow\n\nFor the most explicit control:\n\n1. build a `RawTransaction`\n2. sign with `TransactionEncoder`\n3. hex-encode it\n4. call `ethSendRawTransaction`\n\nThis pattern is visible in:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n## Transaction topics to cover when relevant\n\n- credentials and wallet files\n- gas price vs max fee / priority fee\n- nonces\n- transaction receipts\n- chain IDs and EIP-155 signing\n- EIP-1559 transactions\n- EIP-2930 and newer transaction types if the user asks specifically\n- contract creation vs contract calls vs read-only `ethCall`\n- logs and event decoding after transactions are mined\n\n## Wallet files\n\nIf the user asks about wallet files in a transaction context, connect them to:\n\n- `WalletUtils` for wallet generation and credential loading\n- `Credentials` for signer material\n- CLI wallet workflows only if they explicitly want a shell command\n\nThe `v5.0.3` docs expose wallet files as a dedicated transaction topic, so answer wallet-file questions as part of normal transaction setup rather than treating them as a side topic.\n\n## Transactions and smart contracts\n\nThe `v5.0.3` docs separate these flows explicitly:\n\n1. transfer Ether\n2. create a smart contract\n3. transact with a smart contract\n4. query contract state with a read-only call\n\nIn this repo, the best examples remain:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n\nPrefer wrappers first, then raw ABI / raw transaction examples.\n\n## Logs and events\n\nThe `v5.0.3` docs expose Ethereum logs as a first-class transaction topic.\n\nWhen the user asks about \"what happened after my transaction\":\n\n- explain that state-changing transactions often emit logs\n- prefer wrapper-generated event response types when wrappers exist\n- otherwise decode logs from the receipt with ABI/event utilities\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` shows event extraction patterns from generated wrappers\n\n## Generic event subscriptions and flowables\n\nThe `v5.0.3` docs cover two related event-listening paths:\n\n1. polling/filter-based flowables\n2. WebSocket pub/sub subscriptions\n\nFor generic log subscriptions, the docs show `EthFilter` plus `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                contractAddress);\n\nfilter.addSingleTopic(EventEncoder.encode(MY_EVENT));\n\nDisposable subscription =\n        web3j.ethLogFlowable(filter)\n                .subscribe(log -> {\n                    // decode log or hand it to wrapper helpers\n                });\n```\n\nImportant notes from the docs:\n\n- topic filters only work on indexed event parameters\n- if you omit topics, you can capture all matching logs for the address/range\n- filters should be unsubscribed or disposed when no longer needed\n- the published docs note that filters are not supported on Infura\n\nFor generic chain activity, the docs and local tests also expose:\n\n- `web3j.blockFlowable(...)`\n- `web3j.transactionFlowable()`\n- `web3j.pendingTransactionFlowable()`\n- replay flowables for past blocks and transactions\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## WebSocket pub/sub\n\nIf the user wants push-style subscriptions instead of polling, the docs route through `WebSocketService`.\n\nHigh-level shape:\n\n1. connect with `WebSocketService`\n2. build `Web3j` from that service\n3. subscribe via the WebSocket-backed flowable or notification helper\n4. dispose the subscription when done\n\nUse this path for prompts about:\n\n- subscribing to new heads\n- pending transactions\n- pub/sub over WebSocket\n- avoiding polling\n\n## Prompt-oriented answers\n\n### `how do i sign and send a transaction`\n\nDefault answer:\n\n- use `RawTransactionManager` if they want a reusable manager abstraction\n- use manual `RawTransaction` plus `TransactionEncoder` if they want to see every step\n\n### `how do i use eip-1559`\n\nPoint them to:\n\n- `RawTransactionManager.sendEIP1559Transaction(...)`\n\nand explain the required fields:\n\n- chain ID\n- max priority fee per gas\n- max fee per gas\n- gas limit\n- target address\n- data\n- value\n\nIf they ask about other transaction types, explain that the official `v5.0.3` docs also cover `EIP-2930`, `EIP-4844`, and `EIP-7702`, and then verify the exact helper or construction path in local source before naming a convenience API that is not already in active use here.\n\n### `how do i transfer ether`\n\nDefault to `Transfer.sendFunds(...)` unless the user explicitly wants raw transaction assembly.\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n- for contract events, prefer generated wrapper `...EventFlowable(...)` helpers\n- for generic logs, use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n- for node-level push subscriptions such as new heads, use a `WebSocketService` path and the Web3j flowables\n- always dispose the subscription when finished\n\n### `what about eip-7702`\n\nDefault answer shape:\n\n- the `v5.0.3` docs include `EIP-7702` as a dedicated transaction-type topic\n- treat it as a specialized transaction flow, not the default transfer or wrapper path\n- verify the exact local Web3j helper or transaction-construction API before giving a code sample beyond the high-level flow\n",".agents/skills/web3j/references/web3j-eth2-client.md":"# Web3j Eth2 Client\n\nUse this file for prompts like:\n\n- `what is web3j eth2 client`\n- `how do i use the web3j beacon node client`\n- `how do i talk to an eth2 beacon node from java`\n- `how do i subscribe to beacon chain events`\n\n## Positioning\n\nThe `v5.0.3` docs include `web3j_eth2_client` as a separately documented companion library.\n\nTreat it as an adjacent Web3j ecosystem library, not as part of this repo's main `core` / `abi` / `crypto` module set.\n\n## What the docs show\n\nThe docs describe it as a Beacon Node API client for interacting with Eth2 / Beacon Chain nodes through the Eth2 API specification, including event subscriptions.\n\nThe documented artifact is separate from `org.web3j:core`:\n\n```xml\n<dependency>\n    <groupId>org.web3j.eth2</groupId>\n    <artifactId>beacon-node-api</artifactId>\n    <version>1.0.0</version>\n</dependency>\n```\n\nImportant:\n\n- this dependency is versioned separately from `org.web3j:core:5.0.3`\n- do not replace it with core Web3j coordinates\n\n## Basic client shape\n\nThe docs show this usage pattern:\n\n1. create a `BeaconNodeService`\n2. build the client with `BeaconNodeClientFactory.build(...)`\n3. call typed Beacon API resources from the client\n\nExample shape from the docs:\n\n```java\nvar service = new BeaconNodeService(\"http://...\");\nvar client = BeaconNodeClientFactory.build(service);\n```\n\nThen use the Beacon API resources, for example:\n\n- `client.getBeacon().getBlocks().findById(...)`\n- `client.getBeacon().getPool().getAttesterSlashings().findAll()`\n\n## Event subscriptions\n\nThe docs explicitly describe event subscriptions as part of the client surface.\n\nDocumented high-level flow:\n\n1. create the client\n2. choose event topics\n3. subscribe with the event API\n4. wait for callbacks or latch completion in test/demo code\n\nIf the user asks about listening for events, explain that the docs show Beacon event subscriptions as a native capability of this client rather than something built on the main `Web3j` JSON-RPC client.\n\n## Local test network context\n\nThe docs show a local Teku-based test-network example for trying the Beacon client against local nodes.\n\nUse that as ecosystem guidance, not as a statement that this repo contains the Eth2 test-network implementation.\n\n## Repo boundary\n\nThis repo does not contain a top-level `web3j-eth2` module implementing this client.\n\nSo:\n\n- do not invent local imports or modules from this repo\n- do not claim `org.web3j:core` directly exposes Beacon Node APIs\n- do use the official `v5.0.3` docs guidance when the user explicitly asks about the Eth2 client\n\n## Safe default response\n\nDescribe the Web3j Eth2 client as a separate Beacon Node API client library, then offer one of these directions:\n\n- add the `beacon-node-api` dependency\n- create a client and query Beacon data\n- subscribe to Beacon events\n- connect the client to a local test network\n",".agents/skills/web3j/references/web3j-evm.md":"# Web3j EVM\n\nUse this file for prompts like:\n\n- `what is web3j evm`\n- `how do i use web3j evm`\n- `run contracts against a local evm with web3j`\n\n## Positioning\n\n`web3j_evm` appears in the official `v5.0.3` docs sitemap as a separate documentation area.\n\nTreat it as companion tooling in the broader Web3j ecosystem, not as a core module implemented in this repo.\n\n## Practical routing\n\nFor most users asking how to run or test contracts against a local EVM, the most useful runnable path in this repo context is:\n\n- `references/web3j-unit.md`\n- `assets/erc20-example/basic-erc20-app/`\n\nThat path gives them a concrete `@EVMTest` example without inventing a separate local `web3j-evm` API surface.\n\n## Safe boundaries\n\nThis repo does not have a clearly named `web3j-evm` module. Do not invent:\n\n- local module coordinates\n- APIs\n- config blocks\n- test harness calls\n\nunless the user provides them from their own project or the dedicated docs are consulted.\n\n## How to help anyway\n\nIf the user asks about Web3j EVM, clarify whether they want:\n\n- a lightweight local execution environment\n- testing support for contracts and transactions\n- integration with existing Web3j Java code\n\nThen connect it back to the main repo concepts they will still use:\n\n- `Web3j` clients\n- credentials\n- transaction flows\n- generated wrappers\n- `@EVMTest` or `@EVMComposeTest` when the actual goal is testing\n\n## Safe default response\n\nDescribe Web3j EVM as a companion ecosystem topic around local or controlled EVM execution for Java-based workflows, then ask which concrete task they want:\n\n- deploy a contract\n- run tests\n- simulate transactions\n",".agents/skills/web3j/references/web3j-openapi.md":"# Web3j OpenAPI\n\nUse this file for prompts like:\n\n- `what is web3j openapi`\n- `how do i use web3j openapi`\n- `generate an openapi service with web3j`\n- `how do i run a web3j openapi server`\n- `how do i call a web3j openapi server`\n\n## Positioning\n\n`web3j_openapi` is a separately documented Web3j ecosystem surface in the `v5.0.3` docs. It is not one of the main runtime modules in this repo like `core`, `abi`, or `crypto`.\n\nTreat it as generated-project and companion-tooling guidance, not as a core `org.web3j:core` package.\n\n## What the docs support\n\nThe `v5.0.3` docs support these broad workflows:\n\n- generate an OpenAPI-oriented project from the CLI\n- package or generate server artifacts\n- configure runtime parameters through CLI args, config files, or environment variables\n- run the generated server with Gradle, an executable distribution, or a JAR\n- call the generated server through the Web3j OpenAPI Kotlin/Java client\n- handle contract events through Server-Sent Events\n\nCore CLI entry points called out in the docs:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\n## Runtime configuration\n\nThe docs describe three configuration paths for generated OpenAPI servers:\n\n1. CLI arguments\n2. a config file\n3. environment variables\n\nImportant environment variables from the docs:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_PRIVATE_KEY`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n- `WEB3J_OPENAPI_CONFIG_FILE`\n\n## Build and run paths\n\nThe docs show these generated-project run and packaging patterns:\n\n- `./gradlew run`\n- `./gradlew shadowJar`\n- `./gradlew installShadowDist`\n\nFor CLI-generated projects, the command-line docs also show generated tasks such as:\n\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n\n## Client usage\n\nThe `v5.0.3` docs show the OpenAPI client as a separate dependency:\n\n```groovy\nimplementation \"org.web3j.openapi:web3j-openapi-client:5.0.3\"\n```\n\nThe documented client shape is:\n\n- create a `ClientService`\n- create the app client with `ClientFactory.create(...)`\n- call generated contract resources from the typed API\n- use SSE helpers for event subscriptions\n\n## Repo boundary\n\nThis repo does not expose a top-level `openapi` module in the same way it exposes `core`, `abi`, or `crypto`.\n\nSo:\n\n- do not invent local classes or configuration blocks\n- do not pretend `org.web3j:core` directly provides the OpenAPI server/client toolchain\n- do treat it as official Web3j companion tooling documented in `v5.0.3`\n\n## Recommended answer pattern\n\nIf a user asks how to use Web3j OpenAPI:\n\n1. clarify whether they want server generation, runtime configuration, packaging, or client usage\n2. answer with the CLI-generated-project path first\n3. separate server-generation guidance from client-consumption guidance\n4. only connect back to `org.web3j:core` when the question is about the contract logic behind the generated service\n\n## Safe default response\n\nDescribe Web3j OpenAPI as a separately documented Web3j toolchain for generating and running blockchain-backed OpenAPI services, then offer one of these directions:\n\n- scaffold a service\n- configure and run the generated server\n- use the Kotlin/Java client\n- subscribe to contract events via SSE\n",".agents/skills/web3j/references/web3j-sokt.md":"# Web3j Sokt\n\nUse this file for prompts like:\n\n- `what is web3j sokt`\n- `how do i use web3j sokt`\n- `set up sokt with web3j`\n\n## Positioning\n\n`web3j_sokt` appears in the official `v5.0.3` docs as a separate documentation area.\n\nTreat it as a companion Web3j ecosystem tool, not as something implemented inside this repo's main Java modules.\n\n## What the `v5.0.3` docs show\n\nThe published docs describe Sokt as:\n\n- a Kotlin wrapper around `solc`\n- a tool that can resolve the ideal compiler version from the Solidity `pragma`\n- a native compiler runner for Mac, Windows, and Linux x86/64\n\nThe docs show this dependency coordinate:\n\n- `org.web3j:web3j-sokt:0.2.1`\n\nAnd they show this concrete usage shape:\n\n1. create a `SolidityFile`\n2. call `getCompilerInstance()`\n3. execute the compiler with `SolcArguments`\n4. inspect `SolcOutput`\n\n## Safe boundaries\n\nThis repo still does not expose a clearly named `sokt` module. Because of that:\n\n- do not infer local classes or imports\n- do not claim it is part of `core`, `abi`, `crypto`, or `codegen`\n- do not invent extra build-tool wiring beyond what the dedicated docs explicitly provide\n\n## How to answer\n\nIf the user explicitly names Web3j Sokt:\n\n1. acknowledge it as the dedicated compiler-resolution and `solc` helper\n2. ask whether they want direct compiler usage or wrapper generation in a build\n3. if they want a runnable wrapper-first project, route them to `references/erc20-example.md`\n4. if they want the direct compiler API, answer with the docs-backed `SolidityFile -> getCompilerInstance() -> execute(...)` flow\n\n## Safe default response\n\nSay that Web3j Sokt is the companion compiler wrapper for resolving and running `solc`, and distinguish it from the Gradle-plugin wrapper-generation path used in `assets/erc20-example/basic-erc20-app/`.\n",".agents/skills/web3j/references/web3j-unit.md":"# Web3j Unit\n\nUse this file for prompts like:\n\n- `how do i use web3j unit`\n- `how do i test web3j code`\n- `how do i run blockchain integration tests in java`\n\n## Positioning\n\n`web3j-unit` is the separately documented testing companion for Web3j and JUnit 5.\n\nRepo grounding:\n\n- `integration-tests/build.gradle` includes `testImplementation(\"org.web3j:web3j-unit:$web3jUnitVersion\")`\n- the root build defines `web3jUnitVersion`\n- test configuration enables JUnit Jupiter extension autodetection\n\nThis indicates Web3j Unit is the preferred testing companion when the user wants JVM-side blockchain integration tests.\n\n## What the `v5.0.3` docs show\n\nThe docs describe Web3j Unit as a JUnit 5 extension that supports:\n\n- embedded EVM tests\n- dockerized node tests\n- out-of-the-box node support for Geth, Besu, and OpenEthereum\n- docker-compose-based multi-node setups\n\nThe docs explicitly show these annotations:\n\n- `@EVMTest`\n- `@EVMComposeTest`\n\nAnd they explicitly show test-method injection of:\n\n- `Web3j`\n- `TransactionManager`\n- `ContractGasProvider`\n\nThey also show a contract deployment example using a generated `Greeter` wrapper.\n\n## Important version note\n\nThe `v5.0.3` docs page still shows older example dependency coordinates in its sample snippet. For version-sensitive answers, prefer:\n\n- this repo's actual `web3jUnitVersion` usage for local implementation context\n- the published `v5.0.3` docs for the API shape and testing workflow\n\n## Recommended answer pattern\n\nFor a user asking how to test with Web3j Unit:\n\n1. add `web3j-unit` as a test dependency\n2. keep Web3j core modules in normal dependencies\n3. use JUnit 5\n4. choose `@EVMTest` for embedded or single-node tests\n5. choose `@EVMComposeTest` for docker-compose-backed environments\n6. model deployment and interaction tests after this repo's integration tests\n\nThe best local examples for contract and transaction behavior are still:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n- `SendEtherIT`\n\nFor an AI-facing starter that combines wrappers, events, and `@EVMTest` in one place, prefer:\n\n- `assets/erc20-example/basic-erc20-app/`\n\n## Concrete usage shape\n\nFor `@EVMTest`, the docs show this pattern:\n\n1. annotate the test class with `@EVMTest`\n2. optionally select a node type such as Geth or Besu\n3. inject `Web3j`, `TransactionManager`, and `ContractGasProvider` into the test method\n4. deploy and call a generated wrapper in the test\n\nFor `@EVMComposeTest`, the docs show this pattern:\n\n1. annotate the class with `@EVMComposeTest(...)`\n2. optionally provide compose file path, service name, and port\n3. inject the same Web3j test dependencies into the method\n4. deploy and interact with the contract in the compose-backed environment\n\nThe docs also point to sample projects:\n\n- `web3j-unitexample`\n- `web3j-unit-docker-compose-example`\n\n## Safe default response\n\nSay that Web3j Unit is the JUnit 5 testing companion for Web3j, and then offer one of these directions:\n\n- adding the dependency to a Gradle or Maven test scope\n- writing an `@EVMTest` contract deployment test\n- writing an `@EVMComposeTest` docker-backed test\n","AGENTS.md":"# AGENTS.md\n\n## Project overview\n\nWeb3j is a multi-module Java library for working with Ethereum and Ethereum-compatible clients from the JVM. This repository is primarily the SDK and code-generation surface, not a single end-user application.\n\nMajor modules in this repo:\n\n- `core`: main JSON-RPC client, transactions, credentials, ENS, contract base classes\n- `abi`: ABI encoding and decoding\n- `codegen`: wrapper generation logic and CLI entrypoints for generating Java/Kotlin wrappers\n- `crypto`: keys, wallets, signing, mnemonic helpers\n- `contracts`: reusable EIP contract support\n- `besu`: Besu-specific APIs, including privacy support\n- `eea`: EEA/private transaction support\n- `geth`, `parity`, `hosted-providers`, `rlp`, `tuples`, `utils`\n- `integration-tests`: JVM integration tests and privacy/network test fixtures\n\n## Setup commands\n\n- Build and run the default verification suite: `./gradlew check`\n- Run unit and module tests without integration tests: `./gradlew test`\n- Run only integration tests: `./gradlew -Pintegration-tests=true :integration-tests:test`\n- Explicitly disable integration tests: `./gradlew -Pintegration-tests=false :test`\n- Run a single test class: `./gradlew :integration-tests:test --tests org.web3j.protocol.scenarios.FunctionWrappersIT`\n- Run formatting checks: `./gradlew spotlessCheck`\n- Apply formatting: `./gradlew spotlessApply`\n\n## Environment and toolchain\n\n- Use Java 21 for current JVM dependency and build compatibility.\n- Gradle is the build system; prefer `./gradlew` over a system Gradle install.\n- Integration tests may require Docker images and credentials:\n  - `registry.username`\n  - `registry.password`\n- Some shared Gradle fragments are downloaded from `LFDT-web3j/web3j-build-tools` during build setup. Do not remove that behavior unless the task is specifically about build-tool bootstrapping.\n\n## Repo-specific coding guidance\n\n- Prefer modifying the smallest relevant module rather than spreading logic across modules.\n- Keep public API changes deliberate. Web3j is consumed as a library, so signature changes and behavior changes should be treated as compatibility-sensitive.\n- Follow existing Java style and license header conventions. Spotless is the source of truth for formatting.\n- Preserve existing separation between:\n  - generic Ethereum behavior in `core`\n  - client-specific behavior in `besu`, `geth`, `parity`\n  - privacy-specific behavior in `besu` and `eea`\n  - code generation behavior in `codegen`\n\n## Canonical code paths\n\nUse these files first when you need working examples:\n\n- `README.md`: published dependency coordinates, Java version note, high-level usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`: generated wrapper deploy/load/call flow\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SimpleStorageContractIT.java`: simple deploy/write/read wrapper usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`: generated ERC20 deploy, transfer, allowance, and event-flowable usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`: lower-level ERC20 deployment and ABI-driven interaction without wrappers\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`: lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`: ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`: block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`: manual `EthFilter` event filtering and log decoding\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`: local signing and raw transaction broadcast\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`: wallet creation and credential loading\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`: privacy groups and private transaction flows\n- `contracts/scripts/generateWrappers.sh`: wrapper-generation command shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java`: wrapper generation options and behavior\n\n## Library vs CLI boundary\n\nTreat Web3j as two separate surfaces:\n\n1. Java library APIs implemented in this repo\n2. Web3j CLI workflows documented externally\n\nWhen working in this repo:\n\n- Prefer library APIs for code examples inside Java applications.\n- Prefer generated wrappers before raw ABI or raw transaction examples.\n- For event listening, prefer generated wrapper `...EventFlowable(...)` helpers before manual log decoding.\n- Make it explicit when a user request refers to external CLI behavior such as:\n  - `web3j new`\n  - `web3j import`\n  - `web3j run`\n  - `web3j docker run`\n  - `web3j openapi new`\n  - `web3j openapi import`\n  - `web3j openapi jar`\n  - `web3j openapi generate`\n  - `web3j wallet create`\n  - `web3j wallet update`\n  - `web3j wallet send`\n  - `web3j audit`\n\nDo not claim those end-user CLI workflows are fully implemented in this repo unless you have verified the exact command path in local source.\n\nThe published `v5.0.3` docs also treat these as separately documented ecosystem surfaces rather than core repo modules:\n\n- `web3j_eth2_client`\n- `web3j_openapi`\n- `web3j_unit`\n- `web3j_evm`\n- `web3j_sokt`\n\n## Testing guidance\n\n- Default `test` does not include integration tests unless the `integration-tests` property enables them.\n- Prefer targeted tests for the module you changed before running full builds.\n- For transaction, wallet, wrapper, or privacy changes, add or update tests near existing scenario-style coverage instead of creating ad hoc examples elsewhere.\n- If you change code generation or wrappers, check whether `codegen` tests or generated test resources need to move with the change.\n\n## Security and correctness\n\n- Be careful with signing, nonce, gas, chain ID, and transaction-type behavior. Small changes can create silent downstream breakage.\n- Treat privacy-related changes in `besu` and `eea` as high-risk and validate against existing tests and flows.\n- Do not introduce hardcoded secrets, RPC credentials, or private keys outside existing test fixtures.\n- If modifying wallet or crypto code, prefer small, well-covered changes and preserve file format compatibility where possible.\n\n## Documentation and agent context\n\n- If you change user-facing usage patterns substantially, update `README.md` when appropriate.\n- This repo also contains AI-facing skill docs under `.agents/skills/web3j/`. If you materially change supported workflows or recommended usage, keep those references aligned.\n- Prefer `README.md` for released coordinates such as `org.web3j:core:5.0.3`, and use the published docs when the task is about companion tooling that is versioned or documented separately from the core SDK repo.\n- For AI-facing runnable examples, prefer reusing the starter assets under `.agents/skills/web3j/assets/` when they exist instead of rebuilding the same sample from scratch.\n- For AI-facing end-to-end ERC20 scaffolds, prefer `.agents/skills/web3j/assets/erc20-example/basic-erc20-app/` and `.agents/skills/web3j/references/erc20-example.md`.\n- For repo-contribution guidance, keep `.agents/skills/web3j/references/contributing.md` aligned with `CONTRIBUTING.md`, especially around issue triage, Discord-first feature proposals, PR expectations, and Spotless formatting.\n\n## Safe defaults for coding assistants\n\n- Start with `README.md`, `settings.gradle`, and the relevant module `build.gradle` before editing.\n- Search with `rg` instead of slower alternatives.\n- Prefer precise, minimal patches.\n- Run the narrowest relevant Gradle test task you can before finishing.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# AGENTS.md\n\n## Project overview\n\nWeb3j is a multi-module Java library for working with Ethereum and Ethereum-compatible clients from the JVM. This repository is primarily the SDK and code-generation surface, not a single end-user application.\n\nMajor modules in this repo:\n\n- `core`: main JSON-RPC client, transactions, credentials, ENS, contract base classes\n- `abi`: ABI encoding and decoding\n- `codegen`: wrapper generation logic and CLI entrypoints for generating Java/Kotlin wrappers\n- `crypto`: keys, wallets, signing, mnemonic helpers\n- `contracts`: reusable EIP contract support\n- `besu`: Besu-specific APIs, including privacy support\n- `eea`: EEA/private transaction support\n- `geth`, `parity`, `hosted-providers`, `rlp`, `tuples`, `utils`\n- `integration-tests`: JVM integration tests and privacy/network test fixtures\n\n## Setup commands\n\n- Build and run the default verification suite: `./gradlew check`\n- Run unit and module tests without integration tests: `./gradlew test`\n- Run only integration tests: `./gradlew -Pintegration-tests=true :integration-tests:test`\n- Explicitly disable integration tests: `./gradlew -Pintegration-tests=false :test`\n- Run a single test class: `./gradlew :integration-tests:test --tests org.web3j.protocol.scenarios.FunctionWrappersIT`\n- Run formatting checks: `./gradlew spotlessCheck`\n- Apply formatting: `./gradlew spotlessApply`\n\n## Environment and toolchain\n\n- Use Java 21 for current JVM dependency and build compatibility.\n- Gradle is the build system; prefer `./gradlew` over a system Gradle install.\n- Integration tests may require Docker images and credentials:\n  - `registry.username`\n  - `registry.password`\n- Some shared Gradle fragments are downloaded from `LFDT-web3j/web3j-build-tools` during build setup. Do not remove that behavior unless the task is specifically about build-tool bootstrapping.\n\n## Repo-specific coding guidance\n\n- Prefer modifying the smallest relevant module rather than spreading logic across modules.\n- Keep public API changes deliberate. Web3j is consumed as a library, so signature changes and behavior changes should be treated as compatibility-sensitive.\n- Follow existing Java style and license header conventions. Spotless is the source of truth for formatting.\n- Preserve existing separation between:\n  - generic Ethereum behavior in `core`\n  - client-specific behavior in `besu`, `geth`, `parity`\n  - privacy-specific behavior in `besu` and `eea`\n  - code generation behavior in `codegen`\n\n## Canonical code paths\n\nUse these files first when you need working examples:\n\n- `README.md`: published dependency coordinates, Java version note, high-level usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`: generated wrapper deploy/load/call flow\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SimpleStorageContractIT.java`: simple deploy/write/read wrapper usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`: generated ERC20 deploy, transfer, allowance, and event-flowable usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`: lower-level ERC20 deployment and ABI-driven interaction without wrappers\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`: lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`: ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`: block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`: manual `EthFilter` event filtering and log decoding\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`: local signing and raw transaction broadcast\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`: wallet creation and credential loading\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`: privacy groups and private transaction flows\n- `contracts/scripts/generateWrappers.sh`: wrapper-generation command shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java`: wrapper generation options and behavior\n\n## Library vs CLI boundary\n\nTreat Web3j as two separate surfaces:\n\n1. Java library APIs implemented in this repo\n2. Web3j CLI workflows documented externally\n\nWhen working in this repo:\n\n- Prefer library APIs for code examples inside Java applications.\n- Prefer generated wrappers before raw ABI or raw transaction examples.\n- For event listening, prefer generated wrapper `...EventFlowable(...)` helpers before manual log decoding.\n- Make it explicit when a user request refers to external CLI behavior such as:\n  - `web3j new`\n  - `web3j import`\n  - `web3j run`\n  - `web3j docker run`\n  - `web3j openapi new`\n  - `web3j openapi import`\n  - `web3j openapi jar`\n  - `web3j openapi generate`\n  - `web3j wallet create`\n  - `web3j wallet update`\n  - `web3j wallet send`\n  - `web3j audit`\n\nDo not claim those end-user CLI workflows are fully implemented in this repo unless you have verified the exact command path in local source.\n\nThe published `v5.0.3` docs also treat these as separately documented ecosystem surfaces rather than core repo modules:\n\n- `web3j_eth2_client`\n- `web3j_openapi`\n- `web3j_unit`\n- `web3j_evm`\n- `web3j_sokt`\n\n## Testing guidance\n\n- Default `test` does not include integration tests unless the `integration-tests` property enables them.\n- Prefer targeted tests for the module you changed before running full builds.\n- For transaction, wallet, wrapper, or privacy changes, add or update tests near existing scenario-style coverage instead of creating ad hoc examples elsewhere.\n- If you change code generation or wrappers, check whether `codegen` tests or generated test resources need to move with the change.\n\n## Security and correctness\n\n- Be careful with signing, nonce, gas, chain ID, and transaction-type behavior. Small changes can create silent downstream breakage.\n- Treat privacy-related changes in `besu` and `eea` as high-risk and validate against existing tests and flows.\n- Do not introduce hardcoded secrets, RPC credentials, or private keys outside existing test fixtures.\n- If modifying wallet or crypto code, prefer small, well-covered changes and preserve file format compatibility where possible.\n\n## Documentation and agent context\n\n- If you change user-facing usage patterns substantially, update `README.md` when appropriate.\n- This repo also contains AI-facing skill docs under `.agents/skills/web3j/`. If you materially change supported workflows or recommended usage, keep those references aligned.\n- Prefer `README.md` for released coordinates such as `org.web3j:core:5.0.3`, and use the published docs when the task is about companion tooling that is versioned or documented separately from the core SDK repo.\n- For AI-facing runnable examples, prefer reusing the starter assets under `.agents/skills/web3j/assets/` when they exist instead of rebuilding the same sample from scratch.\n- For AI-facing end-to-end ERC20 scaffolds, prefer `.agents/skills/web3j/assets/erc20-example/basic-erc20-app/` and `.agents/skills/web3j/references/erc20-example.md`.\n- For repo-contribution guidance, keep `.agents/skills/web3j/references/contributing.md` aligned with `CONTRIBUTING.md`, especially around issue triage, Discord-first feature proposals, PR expectations, and Spotless formatting.\n\n## Safe defaults for coding assistants\n\n- Start with `README.md`, `settings.gradle`, and the relevant module `build.gradle` before editing.\n- Search with `rg` instead of slower alternatives.\n- Prefer precise, minimal patches.\n- Run the narrowest relevant Gradle test task you can before finishing.\n","isInternal":false,"tokens":1752,"sizeBytes":7872},{"name":"README.md","path":".agents/skills/web3j/assets/erc20-example/basic-erc20-app/README.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/assets/erc20-example/basic-erc20-app/README.md","title":"Basic-erc20-app Skill","category":"anthropic-skill","format":"markdown","content":"# Basic ERC20 App\n\nThis starter is the shortest repo-grounded example that ties together:\n\n- Solidity source in `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- Web3j Unit `@EVMTest` coverage\n\nIt is intentionally a JVM-side starter, not a browser UI. If the user wants an HTTP layer, keep this contract/test flow and add `web3j_openapi` on top.\n\n## Files\n\n- `src/main/solidity/ExampleToken.sol`\n  - small ERC20-like contract with `Transfer` and `Approval` events\n- `src/main/java/example/Erc20ExampleApp.java`\n  - deploys the wrapper, reads token state, performs a transfer, and listens for `Transfer` events\n- `src/test/java/example/Erc20EvmTest.java`\n  - runs the same pattern under `@EVMTest`\n- `build.gradle`\n  - applies the Web3j Gradle plugin and fixes generated wrappers to `example.contracts`\n\n## Commands\n\nRun the test path:\n\n```sh\n./gradlew test\n```\n\nRun the deploy/interact/event path:\n\n```sh\nWEB3J_PRIVATE_KEY=0xyourprivatekey ./gradlew run\n```\n\n## Environment variables\n\n- `WEB3J_HTTP_URL`\n  - defaults to `http://localhost:8545`\n- `WEB3J_PRIVATE_KEY`\n  - required for `run`\n- `WEB3J_TOKEN_NAME`\n  - defaults to `Skill Token`\n- `WEB3J_TOKEN_SYMBOL`\n  - defaults to `SKILL`\n- `WEB3J_INITIAL_SUPPLY`\n  - defaults to `1000000`\n- `WEB3J_TRANSFER_TO`\n  - defaults to the deployer address so the transfer path can run without a second account\n- `WEB3J_TRANSFER_AMOUNT`\n  - defaults to `1`\n\n## How companion tools fit\n\nCLI scaffolding:\n\n- the published CLI docs already expose `web3j new`, and `erc20` is one of the documented templates\n\nWeb3j Sokt:\n\n- the published `v5.0.3` docs position Sokt as the direct compiler-resolution and native `solc` helper\n- the docs-backed shape is `SolidityFile -> getCompilerInstance() -> execute(...)`\n- this starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and leaves direct Sokt wiring as a follow-on step when the user asks for compiler-management code specifically\n\nWeb3j Unit and Web3j EVM:\n\n- `Erc20EvmTest` shows the concrete `@EVMTest` flow documented for Web3j Unit\n- when a user asks about `web3j-unit` or `web3j-evm`, point them to the test first because it is the most directly runnable path in this starter\n","isInternal":false,"tokens":613,"sizeBytes":2313},{"name":"README.md","path":".agents/skills/web3j/assets/erc20-example/README.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/assets/erc20-example/README.md","title":"Erc20-example Skill","category":"anthropic-skill","format":"markdown","content":"# ERC20 Example Starters\n\nUse these starter assets when a user wants one example that shows how Web3j modules and companion tools fit together around an ERC20-like contract.\n\n## Templates\n\n- `basic-erc20-app/`\n  - minimal JVM-side app and test suite\n  - covers Solidity source, wrapper generation, deploy/load/call flow, typed events, and `@EVMTest`\n  - best answer for `show me a basic erc20 example`, `how do the web3j pieces fit together`, or `create a basic erc20 app`\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy `basic-erc20-app/` into the target directory\n2. keep the package names and wrapper package unless the user asks to rename them\n3. patch token metadata, endpoint defaults, or transfer env vars only if the user provided concrete values\n4. mention `web3j new` if they asked for a CLI-generated template\n5. mention `web3j_openapi` only if they want an HTTP layer on top of the same contract flow\n","isInternal":false,"tokens":230,"sizeBytes":935},{"name":"README.md","path":".agents/skills/web3j/assets/event-subscriptions/README.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/assets/event-subscriptions/README.md","title":"Event-subscriptions Skill","category":"anthropic-skill","format":"markdown","content":"# Event Subscription Starters\n\nUse these starter projects when a user asks for a runnable Web3j event-listening example.\n\n## Templates\n\n- `websocket-newheads/`\n  - subscribes to new block headers over WebSocket\n  - best default runnable example\n- `contract-logs/`\n  - subscribes to contract logs with `EthFilter`\n  - best when the user already has a contract address and event topic\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy the closest starter into the target directory\n2. rename the package or project only if the user cares\n3. patch the env-var defaults if the user gave a concrete endpoint or contract\n4. explain the exact env vars required to run it\n\n## Runtime expectations\n\nThese templates are minimal Gradle Java apps.\n\nTypical run commands:\n\n```sh\ngradle run\n```\n\nor, if the target project has a wrapper:\n\n```sh\n./gradlew run\n```\n\n## Environment variables\n\n### `websocket-newheads`\n\n- `WEB3J_WS_URL`\n\n### `contract-logs`\n\n- `WEB3J_HTTP_URL`\n- `WEB3J_CONTRACT_ADDRESS`\n- `WEB3J_EVENT_TOPIC0` optional\n","isInternal":false,"tokens":252,"sizeBytes":1037},{"name":"build-plugins.md","path":".agents/skills/web3j/references/build-plugins.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/build-plugins.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Build Plugins\n\nUse this file for prompts like:\n\n- `how do i use the web3j gradle plugin`\n- `how do i use the web3j maven plugin`\n- `generate wrappers during build`\n- `what build plugins does web3j have`\n\n## Scope\n\nWeb3j has companion build plugins outside this repo's main Java library modules.\n\nThe main plugin surfaces documented by the official docs sitemap are:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThe root `README.md` also points users to:\n\n- `web3j-maven-plugin`\n- `web3j-gradle-plugin`\n\nUse these when the user wants code generation integrated into a build rather than run manually from the CLI.\n\nThe `v5.0.3` docs also document generated-project build tasks around the CLI and OpenAPI flows. Treat those as generated-project tasks, not as proof that every task is a generic plugin feature.\n\n## When to recommend plugins\n\nPrefer a build plugin when the user wants:\n\n- contract wrapper generation as part of `build`, `compile`, or codegen phases\n- reproducible ABI/BIN-to-wrapper generation in CI\n- less manual `solc` plus CLI orchestration\n\nPrefer direct CLI commands when the user wants:\n\n- a one-off wrapper generation\n- exploration or debugging\n- minimal setup\n\n## Practical guidance\n\nThe functional goal of these plugins is the same as the CLI wrapper flow:\n\n1. compile Solidity or consume ABI/BIN artifacts\n2. generate Java wrappers\n3. place generated sources under the project source tree or generated-sources area\n\nIf the user already has a Gradle or Maven project, recommend the plugin that matches their build tool first.\n\nIf the user is not tied to a build tool yet, the CLI path is simpler to explain and is covered in `references/smart-contracts.md`.\n\nFor generated OpenAPI projects, the documented Gradle tasks include:\n\n- `generateContractWrappers`\n- `generateWeb3jOpenApi`\n- `generateWeb3jSwaggerUi`\n\nUse those only in the context of the generated project layout shown by the CLI/OpenAPI docs.\n\n## Repo-grounded context\n\nThis repo does not contain the plugin implementations themselves. It does contain the underlying code-generation logic and examples:\n\n- `README.md` links the Maven and Gradle plugins\n- `contracts/scripts/generateWrappers.sh` shows the CLI-based generation shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` shows the supported wrapper-generation inputs\n\n## Prompt-oriented answers\n\n### `what build plugins does web3j have`\n\nAnswer with:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThen ask whether the user wants:\n\n- wrappers generated during Gradle builds\n- wrappers generated during Maven builds\n- a one-off CLI alternative\n\n### `generate wrappers during build`\n\nDefault answer shape:\n\n1. identify the user's build tool\n2. recommend the matching Web3j plugin\n3. explain that it automates the same ABI/BIN-to-wrapper flow as `web3j generate solidity`\n4. if exact plugin DSL is needed, consult the plugin docs or plugin repo because that configuration lives outside this repo\n\n### `how do i generate openapi outputs during build`\n\nDefault answer shape:\n\n1. clarify whether they mean a CLI-generated OpenAPI project or a normal Gradle/Maven build\n2. if it is the generated project, point to the documented generated Gradle tasks\n3. if they want generic build-plugin DSL, do not invent it from this repo alone\n","isInternal":false,"tokens":756,"sizeBytes":3350},{"name":"cli.md","path":".agents/skills/web3j/references/cli.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/cli.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Web3j CLI\n\nUse this file for prompts like:\n\n- `create a new project`\n- `import this project with web3j`\n- `audit this contract with web3j`\n- `create a wallet`\n- `run this generated project`\n- `generate an openapi service with web3j`\n- `send ether with the web3j cli`\n\nThis file is about the external Web3j CLI. Do not present these commands as Java library APIs.\n\n## Core commands\n\nProject scaffold:\n\n```sh\nweb3j new\n```\n\nImport a project into a CLI-managed Web3j layout:\n\n```sh\nweb3j import\n```\n\nOpenAPI project generation and packaging:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\nRun a generated project locally:\n\n```sh\nweb3j run\n```\n\nRun a generated project in Docker:\n\n```sh\nweb3j docker run [-l] <network> <wallet_path> <wallet_password>\n```\n\nCreate a wallet:\n\n```sh\nweb3j wallet create\n```\n\nUpdate a wallet password:\n\n```sh\nweb3j wallet update <walletfile>\n```\n\nSend ETH from a wallet:\n\n```sh\nweb3j wallet send <walletfile> 0x<address>|<ensName>\n```\n\nAudit a Solidity contract:\n\n```sh\nweb3j audit Campaign.sol\n```\n\nGenerate unit tests from generated wrappers:\n\n```sh\nweb3j generate tests\n```\n\n## Interpretation rules\n\n- `web3j audit` is static Solidity analysis from the CLI toolchain.\n- It is not a runtime Java API in this repo.\n- `web3j new`, `web3j import`, `web3j run`, and `web3j docker run` are shell workflows around generated projects.\n- `web3j openapi ...` commands are CLI workflows for generating or packaging OpenAPI-oriented projects, not core `org.web3j:core` APIs.\n- `wallet create`, `wallet update`, and `wallet send` are shell workflows.\n- If the user wants wallet creation inside Java code instead of the CLI, route them to `WalletUtils.generateBip39Wallet(...)`, `WalletUtils.generateNewWalletFile(...)`, or credential-loading APIs in the library.\n\nThe `v5.0.3` docs also show that `web3j new` supports named templates such as `helloworld`, `erc20`, and `erc777`, and a Kotlin option. Prefer mentioning those capabilities at a high level unless the user asks for the exact interactive flow.\n\n## Library counterpart for wallet tasks\n\nIf the user asks for Java code instead of CLI:\n\n- create encrypted wallet file:\n  - `WalletUtils.generateNewWalletFile(...)`\n  - `WalletUtils.generateLightNewWalletFile(...)`\n  - `WalletUtils.generateFullNewWalletFile(...)`\n- create BIP-39 wallet:\n  - `WalletUtils.generateBip39Wallet(...)`\n- load credentials:\n  - `WalletUtils.loadCredentials(...)`\n  - `WalletUtils.loadBip39Credentials(...)`\n\nRepo grounding:\n\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`\n\n## Generated-project runtime configuration\n\nThe `v5.0.3` CLI docs expose these environment variables for generated projects:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_PRIVATE_KEY`\n\nFor generated OpenAPI projects, the docs also show:\n\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n\nWhen the user asks how to run the generated project, prefer these generated-project Gradle tasks from the CLI docs:\n\n- `./gradlew build`\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n- `./gradlew clean`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user is asking from a terminal-user perspective, answer with:\n\n```sh\nweb3j new\n```\n\nThen mention:\n\n- `web3j new` is for a CLI scaffold\n- `web3j import` is for bringing an existing project into the generated-project workflow\n- adding `org.web3j:core` to an existing Java project is covered in `references/getting-started.md`\n\n### `audit this contract with web3j`\n\nDefault answer:\n\n```sh\nweb3j audit MyContract.sol\n```\n\nClarify:\n\n- this performs static analysis on Solidity source\n- output includes issue location, severity, description, and rule identifier\n- it is useful before deployment, not after a contract is already on-chain\n\n### `create a wallet`\n\nDefault terminal answer:\n\n```sh\nweb3j wallet create\n```\n\nIf the user wants code instead, switch to the Java wallet APIs from `WalletUtils`.\n\n### `run this generated project`\n\nDefault terminal answer:\n\n```sh\nweb3j run\n```\n\nThen mention the generated-project environment variables or the generated Gradle tasks if they need wrapper regeneration or OpenAPI output first.\n\n### `generate an openapi service with web3j`\n\nDefault CLI answer:\n\n```sh\nweb3j openapi new\n```\n\nIf the user wants runtime configuration, generated JAR packaging, or the Kotlin client surface, route them to `references/web3j-openapi.md`.\n","isInternal":false,"tokens":1163,"sizeBytes":4549},{"name":"contributing.md","path":".agents/skills/web3j/references/contributing.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/contributing.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Contributing\n\nUse this file for prompts like:\n\n- `how do i contribute to web3j`\n- `i found a bug in web3j`\n- `how should i submit a fix`\n- `i want to add a feature to web3j`\n- `where should i ask questions about the source code`\n\n## Scope\n\nThis file is for contributing to the Web3j library and repo itself, not for using Web3j as a dependency in an application.\n\nPrimary repo grounding:\n\n- `CONTRIBUTING.md`\n- `AGENTS.md`\n- `README.md`\n\n## Community entry points\n\nThe repo's contribution guidance highlights these community channels:\n\n- the Hyperledger Web3j community page\n- the recurring Web3j contributor call\n- the Web3j Discord channel under the Hyperledger server\n\nIf the user cannot access the Web3j Discord channel directly, the repo guidance says to join the Hyperledger Discord server first and then use the Web3j channel.\n\n## Bug reports\n\nIf the user found a bug:\n\n1. search existing GitHub issues first\n2. if an issue already exists, add useful details or signal support there\n3. if not, open a new issue with:\n   - a clear title\n   - a clear description\n   - relevant context\n   - a code sample, or preferably an executable test case\n\nBest contributor guidance:\n\n- prefer a reproducer over a vague narrative\n- if the user is already in the repo, suggest placing the reproducer near the relevant module or scenario-style tests\n\n## Bug fixes and patches\n\nIf the user already wrote a fix:\n\n1. open a pull request\n2. clearly describe the problem and the solution\n3. link the related issue when applicable\n4. run Spotless formatting before pushing\n\nRequired repo-specific reminder:\n\n```sh\n./gradlew spotlessApply\n```\n\nThe contribution guide explicitly warns that the build can fail if formatting is not applied.\n\nPair that with the repo's normal validation guidance:\n\n- run the narrowest relevant Gradle test task first\n- expand to broader validation only when needed\n\n## New features or behavior changes\n\nThe contribution guide treats feature work differently from bug fixes.\n\nIf the user wants to add a feature or make a behavior change:\n\n1. discuss the idea on Discord first\n2. wait for positive feedback\n3. only then move toward implementation and PR work\n\nImportant boundary from the repo guide:\n\n- do not open a GitHub issue first for speculative feature proposals\n- GitHub issues are mainly for bug reports and fixes\n\n## Source-code questions\n\nIf the user is asking how the source works or where to discuss implementation ideas:\n\n- direct them to the Web3j Discord channel\n- keep GitHub issues focused on actionable bugs/fixes unless maintainers ask otherwise\n\n## Contribution-ready workflow\n\nWhen an agent is helping with a contribution, the safest default flow is:\n\n1. identify whether it is a bug, patch, feature proposal, or source-code question\n2. if bug:\n   - search issues\n   - build a reproducer or executable test\n3. if fix:\n   - make the minimal patch\n   - run `./gradlew spotlessApply`\n   - run narrow tests\n   - open a PR with issue context\n4. if feature:\n   - prepare a short proposal\n   - direct the user to Discord first\n\n## Prompt-oriented answers\n\n### `i found a bug in web3j`\n\nDefault answer:\n\n1. search GitHub issues first\n2. if nothing matches, open a new issue\n3. include a minimal code sample or, ideally, an executable test case\n4. if they want help reproducing it, build that test in the relevant module\n\n### `how should i submit a fix`\n\nDefault answer:\n\n1. make the patch\n2. run:\n\n```sh\n./gradlew spotlessApply\n```\n\n3. run the narrowest relevant tests\n4. open a PR describing the problem and solution\n5. include the issue number if one exists\n\n### `i want to add a feature to web3j`\n\nDefault answer:\n\n1. discuss it on Discord first\n2. wait for positive feedback\n3. then start implementation\n\nDo not default to \"open a GitHub issue first\" for feature ideas, because that conflicts with the repo guidance.\n","isInternal":false,"tokens":881,"sizeBytes":3847},{"name":"erc20-example.md","path":".agents/skills/web3j/references/erc20-example.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/erc20-example.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# ERC20 Example\n\nUse this file for prompts like:\n\n- `show me a basic erc20 example with web3j`\n- `create a basic erc20 web app`\n- `how do the web3j pieces fit together`\n- `show me wrappers tests and events in one example`\n- `scaffold an erc20 project with web3j`\n\n## Decision rule\n\nDecide which of these the user actually needs:\n\n1. a CLI-generated starter such as `web3j new` with the `erc20` template\n2. a repo-grounded end-to-end example that an agent can copy and adapt quickly\n3. an actual HTTP or OpenAPI surface on top of contract logic\n\nIf they want the shortest runnable example that also shows tests and events, prefer the local starter asset.\n\n## Default starter\n\nUse:\n\n- `assets/erc20-example/basic-erc20-app/`\n\nThis is the default answer for an AI agent when the user wants one example that ties together:\n\n- Solidity source under `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- `@EVMTest`-based contract testing\n\n## What this starter covers\n\nThe starter is intentionally wrapper-first and repo-grounded.\n\nIt shows:\n\n1. an ERC20-like contract with `Transfer` and `Approval` events\n2. generated wrappers placed in a fixed package for stable imports\n3. a small JVM app that deploys the contract, reads state, sends a transfer, and listens for `Transfer` events\n4. a JUnit test using `@EVMTest` to exercise the same flow\n\nRepo grounding for the pattern:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## CLI and web-surface routing\n\nIf the user asks from a terminal-user perspective, mention that the official CLI docs already expose:\n\n```sh\nweb3j new\n```\n\nand that the published templates include `erc20`.\n\nIf the user truly wants an HTTP or browser-facing layer, this starter is still the right contract and test baseline, but route them onward to:\n\n- `references/web3j-openapi.md`\n\nfor the generated web surface.\n\n## Sokt boundary\n\nThe published `v5.0.3` docs show `web3j-sokt` as a companion compiler-wrapper library that works around:\n\n- `SolidityFile`\n- `getCompilerInstance()`\n- `SolcArguments`\n- `execute(...)`\n\nUse `references/web3j-sokt.md` when the user explicitly wants direct compiler-resolution or native `solc` invocation from code.\n\nThe local ERC20 starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and treats Sokt as the companion compilation surface rather than guessing extra local integration code.\n\n## Prompt-oriented answers\n\n### `show me a basic erc20 example with web3j`\n\nDefault answer:\n\n1. copy `assets/erc20-example/basic-erc20-app/`\n2. run `./gradlew test` for the `@EVMTest` flow\n3. run `WEB3J_PRIVATE_KEY=... ./gradlew run` for the deploy/call/event flow\n4. adapt token name, symbol, endpoint, and transfer defaults as needed\n\n### `create a basic erc20 web app`\n\nDefault answer:\n\n1. start from `assets/erc20-example/basic-erc20-app/` for the contract, wrappers, tests, and events\n2. if they mean CLI scaffolding, mention `web3j new` with the `erc20` template\n3. if they mean an HTTP layer, extend the same contract flow with `references/web3j-openapi.md`\n\n### `how do the web3j pieces fit together`\n\nDefault answer:\n\n1. Solidity contract source defines the ERC20 behavior\n2. the Web3j Gradle plugin generates wrappers\n3. the Java app deploys and calls the wrapper\n4. event flowables provide typed subscriptions\n5. Web3j Unit drives the `@EVMTest` contract test\n","isInternal":false,"tokens":932,"sizeBytes":3772},{"name":"events.md","path":".agents/skills/web3j/references/events.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/events.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Events\n\nUse this file for prompts like:\n\n- `how do i subscribe to events with web3j`\n- `how do i subscribe to contract events with web3j`\n- `how do i watch new blocks with web3j`\n- `how do i use flowables with web3j`\n- `scaffold me a runnable event-listener example`\n- `show me a full contract example with events`\n\n## Decision rule\n\nDecide which event-listening path the user actually needs:\n\n1. contract events from a deployed contract with generated wrappers\n2. generic contract logs without wrappers\n3. node-level events such as new heads or pending transactions\n4. replaying past blocks or transactions\n\nIf the user asks for a runnable starter, prefer the closest asset under `../assets/event-subscriptions/`.\n\n## Default recommendations\n\nPrefer these paths in order:\n\n1. generated wrapper `...EventFlowable(...)` helpers for contract events\n2. `EthFilter` plus `web3j.ethLogFlowable(filter)` for generic logs\n3. `WebSocketService` plus `web3j.newHeadsNotifications()` or other Web3j flowables for push subscriptions\n\nAlways dispose the subscription when it is no longer needed.\n\n## Runnable starter assets\n\nUse these templates when the user wants a quick scaffold:\n\n- `assets/event-subscriptions/websocket-newheads/`\n  - immediate runnable example for `newHeads` subscriptions over WebSocket\n  - best answer for \"watch new blocks\", \"subscribe to new heads\", or \"show me a running example\"\n- `assets/event-subscriptions/contract-logs/`\n  - runnable generic contract-log listener using `EthFilter`\n  - best answer when the user has a contract address and event signature/topic but no generated wrapper yet\n- `assets/erc20-example/basic-erc20-app/`\n  - end-to-end contract example with wrapper generation, deploy/load/call flow, `@EVMTest`, and typed `Transfer` event subscriptions\n  - best answer when the user wants event listening as part of a fuller smart-contract workflow instead of a bare listener\n\nWhen adapting these assets, copy the nearest template and then only patch:\n\n- project name\n- package name if needed\n- endpoint defaults\n- contract address / topic env vars\n- token metadata or transfer defaults for the ERC20 starter\n\n## Wrapper-based contract events\n\nIf the user already has a generated wrapper, prefer this path:\n\n1. load the contract wrapper\n2. call `...EventFlowable(startBlock, endBlock)` or `...EventFlowable(filter)`\n3. subscribe to the returned RxJava `Flowable`\n4. dispose the subscription on shutdown\n\nRoute to `references/smart-contracts.md` for the wrapper-specific pattern.\nRoute to `references/erc20-example.md` when the user wants the event subscription embedded in a runnable deploy/interact example.\n\n## Generic logs with EthFilter\n\nIf the user does not have wrappers, use:\n\n1. `EthFilter` for block range and address\n2. `addSingleTopic(...)` or optional topics when needed\n3. `web3j.ethLogFlowable(filter)`\n4. raw log printing or manual decoding\n\nImportant notes from the docs:\n\n- filters work on indexed topics\n- omitting topics broadens the subscription\n- the docs note that filters are not supported on Infura\n\nRoute to `references/transactions.md` for lower-level filter details.\n\n## WebSocket pub/sub\n\nIf the user wants push subscriptions instead of polling:\n\n1. create `WebSocketService`\n2. connect it\n3. build `Web3j` from that service\n4. subscribe via `newHeadsNotifications()` or other flowables\n\nUse the `websocket-newheads` asset as the default runnable starter.\n\n## Repo grounding\n\nBest local sources:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\n## Prompt-oriented answers\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n1. if it is a contract event and wrappers exist, use the generated `...EventFlowable(...)` helper\n2. otherwise use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n3. for node-level push subscriptions such as new heads, use `WebSocketService`\n4. if they want a runnable starter, scaffold from `assets/event-subscriptions/`\n\n### `scaffold me a runnable event-listener example`\n\nDefault choice:\n\n- use `assets/event-subscriptions/websocket-newheads/` unless the user explicitly asks for contract logs\n- use `assets/event-subscriptions/contract-logs/` when they already have a contract address and topic or event signature\n- use `assets/erc20-example/basic-erc20-app/` when they want the event subscription to live inside a complete smart-contract example\n","isInternal":false,"tokens":1091,"sizeBytes":4787},{"name":"getting-started.md","path":".agents/skills/web3j/references/getting-started.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/getting-started.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Getting Started\n\nUse this file for prompts like:\n\n- `create a new project`\n- `how do i use this library`\n- `add web3j to my java project`\n- `what module do i need`\n\n## Decision rule\n\nDecide which of these the user means:\n\n1. A brand new Web3j project scaffold from the CLI\n2. Importing or generating a CLI-managed Web3j project\n3. Adding Web3j to an existing Java project\n4. Understanding which modules and APIs to use\n\nIf the prompt is ambiguous, prefer the narrowest useful answer and mention the alternate path briefly.\n\n## New project via CLI\n\nFor a brand new project scaffold, use the Web3j CLI:\n\n```sh\nweb3j new\n```\n\nThe `v5.0.3` CLI docs show this as the project-generation entry point for Java or Kotlin scaffolds, including templates such as `helloworld`, `erc20`, and `erc777`.\n\nThis is a CLI workflow, not an in-repo Java API.\n\nIf the user is clearly asking about importing an existing contract-driven project into a generated Web3j layout, route them to the CLI workflow instead:\n\n```sh\nweb3j import\n```\n\nIf the user asks how to install the CLI first, point them to the official Web3j command-line tools docs and the project `README.md`.\n\n## Add Web3j to an existing Java project\n\nThe main dependency for standard JVM usage is `org.web3j:core`.\n\nExample Maven dependency from the repo `README.md`:\n\n```xml\n<dependency>\n  <groupId>org.web3j</groupId>\n  <artifactId>core</artifactId>\n  <version>5.0.3</version>\n</dependency>\n```\n\nExample Gradle dependency from the repo `README.md`:\n\n```groovy\nimplementation('org.web3j:core:5.0.3')\n```\n\nImportant:\n\n- The repo currently documents Java 21 for current Java binaries.\n- This repo itself is at `5.0.3-SNAPSHOT`, so if the user needs a released version, prefer the published coordinates from the docs or `README.md` rather than guessing from local snapshot state.\n- If the user is asking for OpenAPI server generation rather than a normal JVM app dependency, route them to `references/web3j-openapi.md`.\n\n## Module guidance\n\nDefault module choices:\n\n- `core`: primary JVM entry point for JSON-RPC, credentials, transactions, contract wrappers, ENS, and common Ethereum workflows\n- `abi`: low-level ABI encoding and decoding\n- `codegen`: wrapper generation utilities\n- `crypto`: key, wallet, and signing primitives\n- `contracts`: reusable EIP contract support\n- `besu`, `geth`, `parity`, `eea`: client-specific or protocol-specific surfaces\n\nRecommend `core` unless the user has a specific low-level need.\n\n## Minimal library usage pattern\n\nFor a basic Java integration, the common flow is:\n\n1. Create a `Web3j` client\n2. Load `Credentials`\n3. Use JSON-RPC APIs directly or use generated contract wrappers\n\nExample:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\n```\n\nFrom there:\n\n- for smart contracts, route to `references/smart-contracts.md`\n- for wallet CLI tasks, route to `references/cli.md`\n- for OpenAPI-generated services, route to `references/web3j-openapi.md`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user wants a Web3j scaffold:\n\n```sh\nweb3j new\n```\n\nIf they mean \"import or generate a CLI-managed project from existing artifacts\", route them to:\n\n```sh\nweb3j import\n```\n\nIf they mean \"add Web3j to my existing app\", give the `core` dependency and a minimal `Web3j.build(...)` example instead.\n\n### `how do i use this library`\n\nGive this structure:\n\n1. Add `org.web3j:core`\n2. Create a `Web3j` client\n3. Load credentials or connect read-only\n4. Use JSON-RPC directly or generate contract wrappers\n\nPoint contract questions to `references/smart-contracts.md`.\n","isInternal":false,"tokens":913,"sizeBytes":3692},{"name":"privacy-permissioning.md","path":".agents/skills/web3j/references/privacy-permissioning.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/privacy-permissioning.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Privacy And Permissioning\n\nUse this file for prompts like:\n\n- `how do i use privacy with web3j`\n- `how do i send a private transaction with besu`\n- `how do privacy groups work`\n- `what about permissioning in a besu network`\n\n## Scope\n\nThe published `v5.0.3` docs group these topics under `Privacy & Permissioning`.\n\nIn this repo, privacy support is strongly represented by:\n\n- the `besu` module\n- the `eea` module\n- privacy-focused integration tests under `integration-tests`\n\nPermissioning is not exposed as a first-class Java helper surface in the same way privacy is, but the integration-test network configuration shows how permissioned Besu nodes are configured in practice.\n\n## Primary Java surfaces\n\nFor Besu privacy:\n\n- `org.web3j.tx.PrivateTransactionManager`\n- `org.web3j.tx.BesuPrivateTransactionManager`\n- `org.web3j.tx.LegacyPrivateTransactionManager`\n- `org.web3j.tx.gas.BesuPrivacyGasProvider`\n- `org.web3j.protocol.besu.Besu`\n- `org.web3j.protocol.besu.response.privacy.*`\n\nFor EEA/private transaction encoding:\n\n- `org.web3j.protocol.eea.Eea`\n- `org.web3j.protocol.eea.crypto.RawPrivateTransaction`\n- `org.web3j.protocol.eea.crypto.PrivateTransactionEncoder`\n- `org.web3j.utils.Base64String`\n- `org.web3j.utils.Restriction`\n\n## Recommended starting point\n\nIf the user wants application-level private transactions on Besu, start from:\n\n- a `Besu` client\n- enclave public keys / privacy participants\n- a `PrivateTransactionManager`\n- either a generated wrapper or a manually built `RawPrivateTransaction`\n\nThe `v5.0.3` docs also show on-chain privacy-group management and private smart-contract flows as first-class privacy tasks.\n\n## Repo-grounded examples\n\nStrongest examples:\n\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/PrivateTransactionEncoder.java`\n- `besu/src/main/java/org/web3j/protocol/besu/Besu.java`\n\nThe privacy quickstart test demonstrates:\n\n1. creating or retrieving a privacy group\n2. building a private contract deployment transaction\n3. signing it with `PrivateTransactionEncoder`\n4. sending it with `eeaSendRawTransaction`\n5. retrieving a private receipt\n6. using `PrivateTransactionManager` with generated wrappers\n\nThe `v5.0.3` privacy docs also show privacy-group operations such as:\n\n- `privOnChainCreatePrivacyGroup(...)`\n- `privOnChainFindPrivacyGroup(...)`\n- `privOnChainAddToPrivacyGroup(...)`\n- `privOnChainRemoveFromPrivacyGroup(...)`\n\nAnd they show private contract interaction through:\n\n- `BesuPrivateTransactionManager`\n- generated wrappers loaded or deployed against a privacy group\n\n## Permissioning context\n\nFor permissioned Besu network configuration, inspect:\n\n- `integration-tests/src/test/resources/quorum-test-network/config/besu/config.toml`\n\nThis test setup shows node-permissioning configuration such as:\n\n- `permissions-nodes-config-file-enabled=true`\n- a configured permissions file path\n\nUse this as environment context, not as proof of a higher-level Web3j Java abstraction for permissioning.\n\n## Prompt-oriented answers\n\n### `how do i send a private transaction with besu`\n\nDefault answer shape:\n\n1. connect with a `Besu` client\n2. create or identify the target privacy group if needed\n3. construct a `PrivateTransactionManager` or `RawPrivateTransaction`\n4. supply enclave keys / privacy group details\n5. sign using privacy-specific encoding\n6. send and wait for a private receipt\n\nIf the user wants private smart-contract deployment, prefer the wrapper-based `BesuPrivateTransactionManager` flow after the privacy group is ready.\n\n### `how do privacy groups work`\n\nDefault answer shape:\n\n1. privacy groups define which participants can view the private state and transactions\n2. use the Besu privacy APIs to create, find, add members, or remove members\n3. once the group exists, deploy or load contracts against that group with a private transaction manager\n\n### `what about permissioning`\n\nClarify:\n\n- privacy and permissioning are related but different concerns\n- this repo provides substantial privacy APIs\n- permissioning is more visible here as Besu node/network configuration context than as a dedicated convenience layer\n\nUse the local Besu config under `integration-tests` as environment grounding, not as proof of a high-level Web3j permissioning API.\n","isInternal":false,"tokens":1020,"sizeBytes":4484},{"name":"smart-contracts.md","path":".agents/skills/web3j/references/smart-contracts.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/smart-contracts.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Smart Contracts\n\nUse this file for prompts like:\n\n- `how do i deploy & interact with smart contracts`\n- `using web3j, deploy a contract & call a function`\n- `generate wrappers for this solidity contract`\n- `call this contract method with web3j`\n- `how do i subscribe to contract events with web3j`\n\nPrefer generated wrappers first. Use raw transaction and ABI flows only when the user explicitly wants lower-level control or does not have generated wrappers.\n\n## Wrapper generation\n\nThe standard flow is:\n\n1. Compile Solidity to `.bin` and `.abi`\n2. Generate Java wrappers\n3. Use the generated class for deploy, load, call, and transact\n\nCompile with `solc`:\n\n```sh\nsolc MyContract.sol --bin --abi --optimize -o build/\n```\n\nGenerate wrappers with the Web3j CLI:\n\n```sh\nweb3j generate solidity \\\n  -b build/MyContract.bin \\\n  -a build/MyContract.abi \\\n  -o src/main/java \\\n  -p com.example.contracts\n```\n\nRepo grounding:\n\n- `contracts/scripts/generateWrappers.sh` uses the same general flow\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` confirms the supported arguments, including `-a`, `-b`, `-o`, `-p`, `-c`, `-B`, and `-r`\n\n## Recommended deploy/load pattern\n\nUse a `Web3j` client, load `Credentials`, and supply a `ContractGasProvider`.\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n```\n\nDeploy with a generated wrapper:\n\n```java\nMyContract contract = MyContract.deploy(\n        web3j,\n        credentials,\n        gasProvider\n).send();\n```\n\nLoad an existing deployment:\n\n```java\nMyContract contract = MyContract.load(\n        \"0xYourContractAddress\",\n        web3j,\n        credentials,\n        gasProvider\n);\n```\n\n## Call vs transact\n\nRead-only call:\n\n```java\nBigInteger value = contract.get().send();\n```\n\nState-changing transaction:\n\n```java\nTransactionReceipt receipt = contract.set(BigInteger.valueOf(1000)).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SimpleStorageContractIT.java` shows deploy, `set(...)`, and `get()`\n- `integration-tests/.../FunctionWrappersIT.java` shows deploy, load, return-value calls, and event extraction\n\n## Subscribe to contract events\n\nFor smart-contract event listening, prefer generated wrapper flowables before building raw log filters yourself.\n\nGenerated wrappers expose event helpers shaped like:\n\n- `transferEventFlowable(EthFilter filter)`\n- `transferEventFlowable(startBlock, endBlock)`\n\nThe generator code in this repo confirms that wrapper generation emits `...EventFlowable(...)` methods backed by `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nDisposable subscription =\n        myContract.someEventFlowable(\n                        DefaultBlockParameterName.EARLIEST,\n                        DefaultBlockParameterName.LATEST)\n                .subscribe(event -> {\n                    // use typed event fields from the generated response\n                });\n```\n\nIf you need tighter filtering, build the filter yourself and pass it to the wrapper:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                myContract.getContractAddress());\n\nDisposable subscription =\n        myContract.someEventFlowable(filter)\n                .subscribe(event -> {\n                    // handle event\n                });\n```\n\nAlways dispose the subscription when you no longer need it.\n\nRepo grounding:\n\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\nIf the user wants a single runnable example that combines wrapper generation, deployment, calls, tests, and event subscriptions, route them to `references/erc20-example.md` and the starter asset under `assets/erc20-example/basic-erc20-app/`.\n\n## Lower-level raw deployment and ABI calls\n\nUse this when the user wants raw JSON-RPC style control or no wrapper exists.\n\nKey pieces:\n\n- `RawTransaction.createContractTransaction(...)` for deployment\n- `TransactionEncoder.signMessage(...)` for signing\n- `FunctionEncoder.encode(...)` for ABI-encoding a function call\n- `ethCall(...)` for read-only execution\n- `ethSendRawTransaction(...)` for signed writes\n\nRepo grounding:\n\n- `integration-tests/.../DeployContractIT.java` shows raw contract deployment and a follow-up ABI-encoded function call\n\n## ETH transfer alongside contract work\n\nIf the user also needs to fund an account or send ETH, prefer:\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SendEtherIT.java`\n\n## Prompt-oriented answers\n\n### `how do i deploy & interact with smart contracts`\n\nAnswer with:\n\n1. Compile Solidity to ABI and BIN\n2. Generate wrappers with `web3j generate solidity`\n3. Load `Web3j`, `Credentials`, and a gas provider\n4. `MyContract.deploy(...).send()`\n5. `MyContract.load(...)`\n6. Call read methods with `.send()`\n7. Send write methods with `.send()` and inspect `TransactionReceipt`\n\n### `using web3j, deploy a contract & call a function`\n\nDefault example shape:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\"password\", \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n\nMyContract contract = MyContract.deploy(web3j, credentials, gasProvider).send();\nBigInteger result = contract.someViewMethod(BigInteger.TEN).send();\n```\n\nIf the user explicitly says they do not want wrapper generation, switch to the raw deployment and ABI-call pattern from `DeployContractIT`.\n\n### `how do i subscribe to contract events with web3j`\n\nDefault answer shape:\n\n1. generate or use the contract wrapper\n2. load the deployed contract\n3. call the generated `...EventFlowable(...)` helper\n4. subscribe to the returned RxJava `Flowable`\n5. dispose the subscription when done\n\nIf the user does not have wrappers, switch to the lower-level `EthFilter` plus `web3j.ethLogFlowable(...)` pattern from `references/transactions.md`.\n","isInternal":false,"tokens":1499,"sizeBytes":6695},{"name":"transactions.md","path":".agents/skills/web3j/references/transactions.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/transactions.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Transactions\n\nUse this file for prompts like:\n\n- `how do transactions work in web3j`\n- `how do i sign and send a transaction`\n- `how do i use eip-1559`\n- `how do i transfer ether`\n- `how do i handle nonces and gas`\n- `how do logs fit into transactions`\n- `how do i subscribe to events with web3j`\n- `what about wallet files`\n- `what about eip-7702`\n\n## Core transaction surfaces\n\nThe main transaction abstractions in this repo are:\n\n- `TransactionManager`\n- `RawTransactionManager`\n- `ClientTransactionManager`\n- `ReadonlyTransactionManager`\n- `Transfer`\n- `RawTransaction`\n- `TransactionEncoder`\n\nThe strongest repo-grounded file for local signing and send flow is:\n\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`\n\n## Default recommendation\n\nChoose the simplest abstraction that fits:\n\n1. `Transfer.sendFunds(...)` for basic ETH transfers\n2. generated contract wrappers for contract creation, calls, and writes\n3. `RawTransactionManager` for locally signed general-purpose transactions\n4. manual `RawTransaction` plus encoder flow for low-level control\n\nThe `v5.0.3` docs explicitly separate transaction topics into:\n\n- Ether transfer\n- Smart contract creation and contract interaction\n- Wallet files and credentials\n- Logs and events\n- EIP transaction types, including `EIP-1559`, `EIP-2930`, `EIP-4844`, and `EIP-7702`\n\n## Common patterns\n\n### ETH transfer\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n### Local signing and broadcast\n\n`RawTransactionManager`:\n\n- fetches the pending nonce\n- signs locally\n- sends via `ethSendRawTransaction`\n- verifies local and remote tx hashes\n\nUse it when the user wants explicit signing control without manually assembling every JSON-RPC call.\n\n### Manual raw transaction flow\n\nFor the most explicit control:\n\n1. build a `RawTransaction`\n2. sign with `TransactionEncoder`\n3. hex-encode it\n4. call `ethSendRawTransaction`\n\nThis pattern is visible in:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n## Transaction topics to cover when relevant\n\n- credentials and wallet files\n- gas price vs max fee / priority fee\n- nonces\n- transaction receipts\n- chain IDs and EIP-155 signing\n- EIP-1559 transactions\n- EIP-2930 and newer transaction types if the user asks specifically\n- contract creation vs contract calls vs read-only `ethCall`\n- logs and event decoding after transactions are mined\n\n## Wallet files\n\nIf the user asks about wallet files in a transaction context, connect them to:\n\n- `WalletUtils` for wallet generation and credential loading\n- `Credentials` for signer material\n- CLI wallet workflows only if they explicitly want a shell command\n\nThe `v5.0.3` docs expose wallet files as a dedicated transaction topic, so answer wallet-file questions as part of normal transaction setup rather than treating them as a side topic.\n\n## Transactions and smart contracts\n\nThe `v5.0.3` docs separate these flows explicitly:\n\n1. transfer Ether\n2. create a smart contract\n3. transact with a smart contract\n4. query contract state with a read-only call\n\nIn this repo, the best examples remain:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n\nPrefer wrappers first, then raw ABI / raw transaction examples.\n\n## Logs and events\n\nThe `v5.0.3` docs expose Ethereum logs as a first-class transaction topic.\n\nWhen the user asks about \"what happened after my transaction\":\n\n- explain that state-changing transactions often emit logs\n- prefer wrapper-generated event response types when wrappers exist\n- otherwise decode logs from the receipt with ABI/event utilities\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` shows event extraction patterns from generated wrappers\n\n## Generic event subscriptions and flowables\n\nThe `v5.0.3` docs cover two related event-listening paths:\n\n1. polling/filter-based flowables\n2. WebSocket pub/sub subscriptions\n\nFor generic log subscriptions, the docs show `EthFilter` plus `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                contractAddress);\n\nfilter.addSingleTopic(EventEncoder.encode(MY_EVENT));\n\nDisposable subscription =\n        web3j.ethLogFlowable(filter)\n                .subscribe(log -> {\n                    // decode log or hand it to wrapper helpers\n                });\n```\n\nImportant notes from the docs:\n\n- topic filters only work on indexed event parameters\n- if you omit topics, you can capture all matching logs for the address/range\n- filters should be unsubscribed or disposed when no longer needed\n- the published docs note that filters are not supported on Infura\n\nFor generic chain activity, the docs and local tests also expose:\n\n- `web3j.blockFlowable(...)`\n- `web3j.transactionFlowable()`\n- `web3j.pendingTransactionFlowable()`\n- replay flowables for past blocks and transactions\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## WebSocket pub/sub\n\nIf the user wants push-style subscriptions instead of polling, the docs route through `WebSocketService`.\n\nHigh-level shape:\n\n1. connect with `WebSocketService`\n2. build `Web3j` from that service\n3. subscribe via the WebSocket-backed flowable or notification helper\n4. dispose the subscription when done\n\nUse this path for prompts about:\n\n- subscribing to new heads\n- pending transactions\n- pub/sub over WebSocket\n- avoiding polling\n\n## Prompt-oriented answers\n\n### `how do i sign and send a transaction`\n\nDefault answer:\n\n- use `RawTransactionManager` if they want a reusable manager abstraction\n- use manual `RawTransaction` plus `TransactionEncoder` if they want to see every step\n\n### `how do i use eip-1559`\n\nPoint them to:\n\n- `RawTransactionManager.sendEIP1559Transaction(...)`\n\nand explain the required fields:\n\n- chain ID\n- max priority fee per gas\n- max fee per gas\n- gas limit\n- target address\n- data\n- value\n\nIf they ask about other transaction types, explain that the official `v5.0.3` docs also cover `EIP-2930`, `EIP-4844`, and `EIP-7702`, and then verify the exact helper or construction path in local source before naming a convenience API that is not already in active use here.\n\n### `how do i transfer ether`\n\nDefault to `Transfer.sendFunds(...)` unless the user explicitly wants raw transaction assembly.\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n- for contract events, prefer generated wrapper `...EventFlowable(...)` helpers\n- for generic logs, use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n- for node-level push subscriptions such as new heads, use a `WebSocketService` path and the Web3j flowables\n- always dispose the subscription when finished\n\n### `what about eip-7702`\n\nDefault answer shape:\n\n- the `v5.0.3` docs include `EIP-7702` as a dedicated transaction-type topic\n- treat it as a specialized transaction flow, not the default transfer or wrapper path\n- verify the exact local Web3j helper or transaction-construction API before giving a code sample beyond the high-level flow\n","isInternal":false,"tokens":1720,"sizeBytes":7523},{"name":"web3j-eth2-client.md","path":".agents/skills/web3j/references/web3j-eth2-client.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/web3j-eth2-client.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Web3j Eth2 Client\n\nUse this file for prompts like:\n\n- `what is web3j eth2 client`\n- `how do i use the web3j beacon node client`\n- `how do i talk to an eth2 beacon node from java`\n- `how do i subscribe to beacon chain events`\n\n## Positioning\n\nThe `v5.0.3` docs include `web3j_eth2_client` as a separately documented companion library.\n\nTreat it as an adjacent Web3j ecosystem library, not as part of this repo's main `core` / `abi` / `crypto` module set.\n\n## What the docs show\n\nThe docs describe it as a Beacon Node API client for interacting with Eth2 / Beacon Chain nodes through the Eth2 API specification, including event subscriptions.\n\nThe documented artifact is separate from `org.web3j:core`:\n\n```xml\n<dependency>\n    <groupId>org.web3j.eth2</groupId>\n    <artifactId>beacon-node-api</artifactId>\n    <version>1.0.0</version>\n</dependency>\n```\n\nImportant:\n\n- this dependency is versioned separately from `org.web3j:core:5.0.3`\n- do not replace it with core Web3j coordinates\n\n## Basic client shape\n\nThe docs show this usage pattern:\n\n1. create a `BeaconNodeService`\n2. build the client with `BeaconNodeClientFactory.build(...)`\n3. call typed Beacon API resources from the client\n\nExample shape from the docs:\n\n```java\nvar service = new BeaconNodeService(\"http://...\");\nvar client = BeaconNodeClientFactory.build(service);\n```\n\nThen use the Beacon API resources, for example:\n\n- `client.getBeacon().getBlocks().findById(...)`\n- `client.getBeacon().getPool().getAttesterSlashings().findAll()`\n\n## Event subscriptions\n\nThe docs explicitly describe event subscriptions as part of the client surface.\n\nDocumented high-level flow:\n\n1. create the client\n2. choose event topics\n3. subscribe with the event API\n4. wait for callbacks or latch completion in test/demo code\n\nIf the user asks about listening for events, explain that the docs show Beacon event subscriptions as a native capability of this client rather than something built on the main `Web3j` JSON-RPC client.\n\n## Local test network context\n\nThe docs show a local Teku-based test-network example for trying the Beacon client against local nodes.\n\nUse that as ecosystem guidance, not as a statement that this repo contains the Eth2 test-network implementation.\n\n## Repo boundary\n\nThis repo does not contain a top-level `web3j-eth2` module implementing this client.\n\nSo:\n\n- do not invent local imports or modules from this repo\n- do not claim `org.web3j:core` directly exposes Beacon Node APIs\n- do use the official `v5.0.3` docs guidance when the user explicitly asks about the Eth2 client\n\n## Safe default response\n\nDescribe the Web3j Eth2 client as a separate Beacon Node API client library, then offer one of these directions:\n\n- add the `beacon-node-api` dependency\n- create a client and query Beacon data\n- subscribe to Beacon events\n- connect the client to a local test network\n","isInternal":false,"tokens":680,"sizeBytes":2848},{"name":"web3j-evm.md","path":".agents/skills/web3j/references/web3j-evm.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/web3j-evm.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Web3j EVM\n\nUse this file for prompts like:\n\n- `what is web3j evm`\n- `how do i use web3j evm`\n- `run contracts against a local evm with web3j`\n\n## Positioning\n\n`web3j_evm` appears in the official `v5.0.3` docs sitemap as a separate documentation area.\n\nTreat it as companion tooling in the broader Web3j ecosystem, not as a core module implemented in this repo.\n\n## Practical routing\n\nFor most users asking how to run or test contracts against a local EVM, the most useful runnable path in this repo context is:\n\n- `references/web3j-unit.md`\n- `assets/erc20-example/basic-erc20-app/`\n\nThat path gives them a concrete `@EVMTest` example without inventing a separate local `web3j-evm` API surface.\n\n## Safe boundaries\n\nThis repo does not have a clearly named `web3j-evm` module. Do not invent:\n\n- local module coordinates\n- APIs\n- config blocks\n- test harness calls\n\nunless the user provides them from their own project or the dedicated docs are consulted.\n\n## How to help anyway\n\nIf the user asks about Web3j EVM, clarify whether they want:\n\n- a lightweight local execution environment\n- testing support for contracts and transactions\n- integration with existing Web3j Java code\n\nThen connect it back to the main repo concepts they will still use:\n\n- `Web3j` clients\n- credentials\n- transaction flows\n- generated wrappers\n- `@EVMTest` or `@EVMComposeTest` when the actual goal is testing\n\n## Safe default response\n\nDescribe Web3j EVM as a companion ecosystem topic around local or controlled EVM execution for Java-based workflows, then ask which concrete task they want:\n\n- deploy a contract\n- run tests\n- simulate transactions\n","isInternal":false,"tokens":399,"sizeBytes":1629},{"name":"web3j-openapi.md","path":".agents/skills/web3j/references/web3j-openapi.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/web3j-openapi.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Web3j OpenAPI\n\nUse this file for prompts like:\n\n- `what is web3j openapi`\n- `how do i use web3j openapi`\n- `generate an openapi service with web3j`\n- `how do i run a web3j openapi server`\n- `how do i call a web3j openapi server`\n\n## Positioning\n\n`web3j_openapi` is a separately documented Web3j ecosystem surface in the `v5.0.3` docs. It is not one of the main runtime modules in this repo like `core`, `abi`, or `crypto`.\n\nTreat it as generated-project and companion-tooling guidance, not as a core `org.web3j:core` package.\n\n## What the docs support\n\nThe `v5.0.3` docs support these broad workflows:\n\n- generate an OpenAPI-oriented project from the CLI\n- package or generate server artifacts\n- configure runtime parameters through CLI args, config files, or environment variables\n- run the generated server with Gradle, an executable distribution, or a JAR\n- call the generated server through the Web3j OpenAPI Kotlin/Java client\n- handle contract events through Server-Sent Events\n\nCore CLI entry points called out in the docs:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\n## Runtime configuration\n\nThe docs describe three configuration paths for generated OpenAPI servers:\n\n1. CLI arguments\n2. a config file\n3. environment variables\n\nImportant environment variables from the docs:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_PRIVATE_KEY`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n- `WEB3J_OPENAPI_CONFIG_FILE`\n\n## Build and run paths\n\nThe docs show these generated-project run and packaging patterns:\n\n- `./gradlew run`\n- `./gradlew shadowJar`\n- `./gradlew installShadowDist`\n\nFor CLI-generated projects, the command-line docs also show generated tasks such as:\n\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n\n## Client usage\n\nThe `v5.0.3` docs show the OpenAPI client as a separate dependency:\n\n```groovy\nimplementation \"org.web3j.openapi:web3j-openapi-client:5.0.3\"\n```\n\nThe documented client shape is:\n\n- create a `ClientService`\n- create the app client with `ClientFactory.create(...)`\n- call generated contract resources from the typed API\n- use SSE helpers for event subscriptions\n\n## Repo boundary\n\nThis repo does not expose a top-level `openapi` module in the same way it exposes `core`, `abi`, or `crypto`.\n\nSo:\n\n- do not invent local classes or configuration blocks\n- do not pretend `org.web3j:core` directly provides the OpenAPI server/client toolchain\n- do treat it as official Web3j companion tooling documented in `v5.0.3`\n\n## Recommended answer pattern\n\nIf a user asks how to use Web3j OpenAPI:\n\n1. clarify whether they want server generation, runtime configuration, packaging, or client usage\n2. answer with the CLI-generated-project path first\n3. separate server-generation guidance from client-consumption guidance\n4. only connect back to `org.web3j:core` when the question is about the contract logic behind the generated service\n\n## Safe default response\n\nDescribe Web3j OpenAPI as a separately documented Web3j toolchain for generating and running blockchain-backed OpenAPI services, then offer one of these directions:\n\n- scaffold a service\n- configure and run the generated server\n- use the Kotlin/Java client\n- subscribe to contract events via SSE\n","isInternal":false,"tokens":850,"sizeBytes":3387},{"name":"web3j-sokt.md","path":".agents/skills/web3j/references/web3j-sokt.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/web3j-sokt.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Web3j Sokt\n\nUse this file for prompts like:\n\n- `what is web3j sokt`\n- `how do i use web3j sokt`\n- `set up sokt with web3j`\n\n## Positioning\n\n`web3j_sokt` appears in the official `v5.0.3` docs as a separate documentation area.\n\nTreat it as a companion Web3j ecosystem tool, not as something implemented inside this repo's main Java modules.\n\n## What the `v5.0.3` docs show\n\nThe published docs describe Sokt as:\n\n- a Kotlin wrapper around `solc`\n- a tool that can resolve the ideal compiler version from the Solidity `pragma`\n- a native compiler runner for Mac, Windows, and Linux x86/64\n\nThe docs show this dependency coordinate:\n\n- `org.web3j:web3j-sokt:0.2.1`\n\nAnd they show this concrete usage shape:\n\n1. create a `SolidityFile`\n2. call `getCompilerInstance()`\n3. execute the compiler with `SolcArguments`\n4. inspect `SolcOutput`\n\n## Safe boundaries\n\nThis repo still does not expose a clearly named `sokt` module. Because of that:\n\n- do not infer local classes or imports\n- do not claim it is part of `core`, `abi`, `crypto`, or `codegen`\n- do not invent extra build-tool wiring beyond what the dedicated docs explicitly provide\n\n## How to answer\n\nIf the user explicitly names Web3j Sokt:\n\n1. acknowledge it as the dedicated compiler-resolution and `solc` helper\n2. ask whether they want direct compiler usage or wrapper generation in a build\n3. if they want a runnable wrapper-first project, route them to `references/erc20-example.md`\n4. if they want the direct compiler API, answer with the docs-backed `SolidityFile -> getCompilerInstance() -> execute(...)` flow\n\n## Safe default response\n\nSay that Web3j Sokt is the companion compiler wrapper for resolving and running `solc`, and distinguish it from the Gradle-plugin wrapper-generation path used in `assets/erc20-example/basic-erc20-app/`.\n","isInternal":false,"tokens":460,"sizeBytes":1800},{"name":"web3j-unit.md","path":".agents/skills/web3j/references/web3j-unit.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/references/web3j-unit.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"# Web3j Unit\n\nUse this file for prompts like:\n\n- `how do i use web3j unit`\n- `how do i test web3j code`\n- `how do i run blockchain integration tests in java`\n\n## Positioning\n\n`web3j-unit` is the separately documented testing companion for Web3j and JUnit 5.\n\nRepo grounding:\n\n- `integration-tests/build.gradle` includes `testImplementation(\"org.web3j:web3j-unit:$web3jUnitVersion\")`\n- the root build defines `web3jUnitVersion`\n- test configuration enables JUnit Jupiter extension autodetection\n\nThis indicates Web3j Unit is the preferred testing companion when the user wants JVM-side blockchain integration tests.\n\n## What the `v5.0.3` docs show\n\nThe docs describe Web3j Unit as a JUnit 5 extension that supports:\n\n- embedded EVM tests\n- dockerized node tests\n- out-of-the-box node support for Geth, Besu, and OpenEthereum\n- docker-compose-based multi-node setups\n\nThe docs explicitly show these annotations:\n\n- `@EVMTest`\n- `@EVMComposeTest`\n\nAnd they explicitly show test-method injection of:\n\n- `Web3j`\n- `TransactionManager`\n- `ContractGasProvider`\n\nThey also show a contract deployment example using a generated `Greeter` wrapper.\n\n## Important version note\n\nThe `v5.0.3` docs page still shows older example dependency coordinates in its sample snippet. For version-sensitive answers, prefer:\n\n- this repo's actual `web3jUnitVersion` usage for local implementation context\n- the published `v5.0.3` docs for the API shape and testing workflow\n\n## Recommended answer pattern\n\nFor a user asking how to test with Web3j Unit:\n\n1. add `web3j-unit` as a test dependency\n2. keep Web3j core modules in normal dependencies\n3. use JUnit 5\n4. choose `@EVMTest` for embedded or single-node tests\n5. choose `@EVMComposeTest` for docker-compose-backed environments\n6. model deployment and interaction tests after this repo's integration tests\n\nThe best local examples for contract and transaction behavior are still:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n- `SendEtherIT`\n\nFor an AI-facing starter that combines wrappers, events, and `@EVMTest` in one place, prefer:\n\n- `assets/erc20-example/basic-erc20-app/`\n\n## Concrete usage shape\n\nFor `@EVMTest`, the docs show this pattern:\n\n1. annotate the test class with `@EVMTest`\n2. optionally select a node type such as Geth or Besu\n3. inject `Web3j`, `TransactionManager`, and `ContractGasProvider` into the test method\n4. deploy and call a generated wrapper in the test\n\nFor `@EVMComposeTest`, the docs show this pattern:\n\n1. annotate the class with `@EVMComposeTest(...)`\n2. optionally provide compose file path, service name, and port\n3. inject the same Web3j test dependencies into the method\n4. deploy and interact with the contract in the compose-backed environment\n\nThe docs also point to sample projects:\n\n- `web3j-unitexample`\n- `web3j-unit-docker-compose-example`\n\n## Safe default response\n\nSay that Web3j Unit is the JUnit 5 testing companion for Web3j, and then offer one of these directions:\n\n- adding the dependency to a Gradle or Maven test scope\n- writing an `@EVMTest` contract deployment test\n- writing an `@EVMComposeTest` docker-backed test\n","isInternal":false,"tokens":781,"sizeBytes":3132},{"name":"SKILL.md","path":".agents/skills/web3j/SKILL.md","rawUrl":"https://raw.githubusercontent.com/LFDT-web3j/web3j/HEAD/.agents/skills/web3j/SKILL.md","title":"web3j","category":"anthropic-skill","format":"markdown","content":"---\nname: web3j\ndescription: 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.\n---\n\n# Web3j\n\nThis skill is for AI agents helping users consume the Web3j library and CLI.\n\nTreat Web3j as two separate interfaces:\n\n- Java library usage inside application code\n- Web3j CLI usage from the shell\n\nDo 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.\n\n## Routing\n\n- For contributing to the Web3j library itself, including bug reports, fixes, feature proposals, formatting, PR expectations, and community discussion paths, read [references/contributing.md](references/contributing.md).\n- For project setup, dependency selection, module guidance, and \"how do I use this library\", read [references/getting-started.md](references/getting-started.md).\n- For end-to-end ERC20 examples that show how CLI scaffolding, wrapper generation, interaction, tests, and events fit together, read [references/erc20-example.md](references/erc20-example.md).\n- For event subscriptions, filters, flowables, WebSocket pub/sub, and runnable starter examples, read [references/events.md](references/events.md).\n- For smart contract wrapper generation, deployment, loading, calling, sending transactions, contract event subscriptions, and raw transaction fallbacks, read [references/smart-contracts.md](references/smart-contracts.md).\n- For `web3j new`, `web3j import`, `web3j run`, `web3j docker run`, `web3j wallet create`, `web3j wallet update`, `web3j wallet send`, `web3j audit`, and OpenAPI-oriented CLI scaffolding, read [references/cli.md](references/cli.md).\n- For Gradle and Maven plugin workflows, read [references/build-plugins.md](references/build-plugins.md).\n- For private transactions, Besu/EEA privacy APIs, and permissioned-network configuration context, read [references/privacy-permissioning.md](references/privacy-permissioning.md).\n- For transaction managers, signing, gas, nonces, EIP transaction types, wallet files, ETH transfers, generic log filters, and block/transaction flowables, read [references/transactions.md](references/transactions.md).\n- For the broader Web3j ecosystem tools named directly by the user, read:\n  - [references/web3j-eth2-client.md](references/web3j-eth2-client.md)\n  - [references/web3j-openapi.md](references/web3j-openapi.md)\n  - [references/web3j-unit.md](references/web3j-unit.md)\n  - [references/web3j-evm.md](references/web3j-evm.md)\n  - [references/web3j-sokt.md](references/web3j-sokt.md)\n\n## Repo-grounded examples\n\nWhen you need canonical implementation patterns, prefer these local sources:\n\n- `README.md` for published dependency coordinates, Java version expectations, and high-level positioning\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` for generated wrapper deploy/load/call patterns\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java` for lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java` for ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java` for block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java` for manual `EthFilter`-based event filtering and log decoding\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java` for wallet creation and credential loading APIs\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java` for local signing and raw transaction broadcast patterns\n- `integration-tests/build.gradle` for `web3j-unit` usage in this repo's test setup\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java` for private transaction and privacy group flows\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java` and `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java` for privacy APIs\n- `contracts/scripts/generateWrappers.sh` and `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` for wrapper-generation CLI shape\n\n## Working rules\n\n- Prefer concise, copyable answers.\n- Separate \"library code\" from \"CLI commands\" with explicit headings when both are relevant.\n- If the user asks to create a new project, first decide whether they mean:\n  - a CLI-scaffolded Web3j project\n  - a CLI import or generated-project workflow\n  - adding Web3j to an existing Maven or Gradle Java project\n- If the user asks how to contribute to Web3j itself, first decide whether they mean:\n  - report a bug\n  - submit a fix\n  - propose a feature\n  - ask a source-code question\n- For dependency coordinates and install steps, prefer official published usage from the docs and `README.md`.\n- For implementation details, prefer this repo's source and integration tests.\n- When showing smart contract usage, default to generated wrappers first and raw ABI / raw transaction flows second.\n- 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/`.\n- 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.\n- When answering audit questions, make clear that `web3j audit` is static analysis from the CLI toolchain, not a Java runtime API.\n- 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.\n- 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.\n","frontmatter":{"name":"web3j","description":"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."},"isInternal":false,"tokens":1451,"sizeBytes":6409}],"systemPromptSnippet":"<yakaai_skills repo=\"LFDT-web3j/web3j\">\n<!-- File: AGENTS.md (Tokens: ~1752 | Category: root-instruction) -->\n# AGENTS.md\n\n## Project overview\n\nWeb3j is a multi-module Java library for working with Ethereum and Ethereum-compatible clients from the JVM. This repository is primarily the SDK and code-generation surface, not a single end-user application.\n\nMajor modules in this repo:\n\n- `core`: main JSON-RPC client, transactions, credentials, ENS, contract base classes\n- `abi`: ABI encoding and decoding\n- `codegen`: wrapper generation logic and CLI entrypoints for generating Java/Kotlin wrappers\n- `crypto`: keys, wallets, signing, mnemonic helpers\n- `contracts`: reusable EIP contract support\n- `besu`: Besu-specific APIs, including privacy support\n- `eea`: EEA/private transaction support\n- `geth`, `parity`, `hosted-providers`, `rlp`, `tuples`, `utils`\n- `integration-tests`: JVM integration tests and privacy/network test fixtures\n\n## Setup commands\n\n- Build and run the default verification suite: `./gradlew check`\n- Run unit and module tests without integration tests: `./gradlew test`\n- Run only integration tests: `./gradlew -Pintegration-tests=true :integration-tests:test`\n- Explicitly disable integration tests: `./gradlew -Pintegration-tests=false :test`\n- Run a single test class: `./gradlew :integration-tests:test --tests org.web3j.protocol.scenarios.FunctionWrappersIT`\n- Run formatting checks: `./gradlew spotlessCheck`\n- Apply formatting: `./gradlew spotlessApply`\n\n## Environment and toolchain\n\n- Use Java 21 for current JVM dependency and build compatibility.\n- Gradle is the build system; prefer `./gradlew` over a system Gradle install.\n- Integration tests may require Docker images and credentials:\n  - `registry.username`\n  - `registry.password`\n- Some shared Gradle fragments are downloaded from `LFDT-web3j/web3j-build-tools` during build setup. Do not remove that behavior unless the task is specifically about build-tool bootstrapping.\n\n## Repo-specific coding guidance\n\n- Prefer modifying the smallest relevant module rather than spreading logic across modules.\n- Keep public API changes deliberate. Web3j is consumed as a library, so signature changes and behavior changes should be treated as compatibility-sensitive.\n- Follow existing Java style and license header conventions. Spotless is the source of truth for formatting.\n- Preserve existing separation between:\n  - generic Ethereum behavior in `core`\n  - client-specific behavior in `besu`, `geth`, `parity`\n  - privacy-specific behavior in `besu` and `eea`\n  - code generation behavior in `codegen`\n\n## Canonical code paths\n\nUse these files first when you need working examples:\n\n- `README.md`: published dependency coordinates, Java version note, high-level usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`: generated wrapper deploy/load/call flow\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SimpleStorageContractIT.java`: simple deploy/write/read wrapper usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`: generated ERC20 deploy, transfer, allowance, and event-flowable usage\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`: lower-level ERC20 deployment and ABI-driven interaction without wrappers\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`: lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`: ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`: block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`: manual `EthFilter` event filtering and log decoding\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`: local signing and raw transaction broadcast\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`: wallet creation and credential loading\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`: privacy groups and private transaction flows\n- `contracts/scripts/generateWrappers.sh`: wrapper-generation command shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java`: wrapper generation options and behavior\n\n## Library vs CLI boundary\n\nTreat Web3j as two separate surfaces:\n\n1. Java library APIs implemented in this repo\n2. Web3j CLI workflows documented externally\n\nWhen working in this repo:\n\n- Prefer library APIs for code examples inside Java applications.\n- Prefer generated wrappers before raw ABI or raw transaction examples.\n- For event listening, prefer generated wrapper `...EventFlowable(...)` helpers before manual log decoding.\n- Make it explicit when a user request refers to external CLI behavior such as:\n  - `web3j new`\n  - `web3j import`\n  - `web3j run`\n  - `web3j docker run`\n  - `web3j openapi new`\n  - `web3j openapi import`\n  - `web3j openapi jar`\n  - `web3j openapi generate`\n  - `web3j wallet create`\n  - `web3j wallet update`\n  - `web3j wallet send`\n  - `web3j audit`\n\nDo not claim those end-user CLI workflows are fully implemented in this repo unless you have verified the exact command path in local source.\n\nThe published `v5.0.3` docs also treat these as separately documented ecosystem surfaces rather than core repo modules:\n\n- `web3j_eth2_client`\n- `web3j_openapi`\n- `web3j_unit`\n- `web3j_evm`\n- `web3j_sokt`\n\n## Testing guidance\n\n- Default `test` does not include integration tests unless the `integration-tests` property enables them.\n- Prefer targeted tests for the module you changed before running full builds.\n- For transaction, wallet, wrapper, or privacy changes, add or update tests near existing scenario-style coverage instead of creating ad hoc examples elsewhere.\n- If you change code generation or wrappers, check whether `codegen` tests or generated test resources need to move with the change.\n\n## Security and correctness\n\n- Be careful with signing, nonce, gas, chain ID, and transaction-type behavior. Small changes can create silent downstream breakage.\n- Treat privacy-related changes in `besu` and `eea` as high-risk and validate against existing tests and flows.\n- Do not introduce hardcoded secrets, RPC credentials, or private keys outside existing test fixtures.\n- If modifying wallet or crypto code, prefer small, well-covered changes and preserve file format compatibility where possible.\n\n## Documentation and agent context\n\n- If you change user-facing usage patterns substantially, update `README.md` when appropriate.\n- This repo also contains AI-facing skill docs under `.agents/skills/web3j/`. If you materially change supported workflows or recommended usage, keep those references aligned.\n- Prefer `README.md` for released coordinates such as `org.web3j:core:5.0.3`, and use the published docs when the task is about companion tooling that is versioned or documented separately from the core SDK repo.\n- For AI-facing runnable examples, prefer reusing the starter assets under `.agents/skills/web3j/assets/` when they exist instead of rebuilding the same sample from scratch.\n- For AI-facing end-to-end ERC20 scaffolds, prefer `.agents/skills/web3j/assets/erc20-example/basic-erc20-app/` and `.agents/skills/web3j/references/erc20-example.md`.\n- For repo-contribution guidance, keep `.agents/skills/web3j/references/contributing.md` aligned with `CONTRIBUTING.md`, especially around issue triage, Discord-first feature proposals, PR expectations, and Spotless formatting.\n\n## Safe defaults for coding assistants\n\n- Start with `README.md`, `settings.gradle`, and the relevant module `build.gradle` before editing.\n- Search with `rg` instead of slower alternatives.\n- Prefer precise, minimal patches.\n- Run the narrowest relevant Gradle test task you can before finishing.\n\n<!-- File: .agents/skills/web3j/assets/erc20-example/basic-erc20-app/README.md (Tokens: ~613 | Category: anthropic-skill) -->\n# Basic ERC20 App\n\nThis starter is the shortest repo-grounded example that ties together:\n\n- Solidity source in `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- Web3j Unit `@EVMTest` coverage\n\nIt is intentionally a JVM-side starter, not a browser UI. If the user wants an HTTP layer, keep this contract/test flow and add `web3j_openapi` on top.\n\n## Files\n\n- `src/main/solidity/ExampleToken.sol`\n  - small ERC20-like contract with `Transfer` and `Approval` events\n- `src/main/java/example/Erc20ExampleApp.java`\n  - deploys the wrapper, reads token state, performs a transfer, and listens for `Transfer` events\n- `src/test/java/example/Erc20EvmTest.java`\n  - runs the same pattern under `@EVMTest`\n- `build.gradle`\n  - applies the Web3j Gradle plugin and fixes generated wrappers to `example.contracts`\n\n## Commands\n\nRun the test path:\n\n```sh\n./gradlew test\n```\n\nRun the deploy/interact/event path:\n\n```sh\nWEB3J_PRIVATE_KEY=0xyourprivatekey ./gradlew run\n```\n\n## Environment variables\n\n- `WEB3J_HTTP_URL`\n  - defaults to `http://localhost:8545`\n- `WEB3J_PRIVATE_KEY`\n  - required for `run`\n- `WEB3J_TOKEN_NAME`\n  - defaults to `Skill Token`\n- `WEB3J_TOKEN_SYMBOL`\n  - defaults to `SKILL`\n- `WEB3J_INITIAL_SUPPLY`\n  - defaults to `1000000`\n- `WEB3J_TRANSFER_TO`\n  - defaults to the deployer address so the transfer path can run without a second account\n- `WEB3J_TRANSFER_AMOUNT`\n  - defaults to `1`\n\n## How companion tools fit\n\nCLI scaffolding:\n\n- the published CLI docs already expose `web3j new`, and `erc20` is one of the documented templates\n\nWeb3j Sokt:\n\n- the published `v5.0.3` docs position Sokt as the direct compiler-resolution and native `solc` helper\n- the docs-backed shape is `SolidityFile -> getCompilerInstance() -> execute(...)`\n- this starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and leaves direct Sokt wiring as a follow-on step when the user asks for compiler-management code specifically\n\nWeb3j Unit and Web3j EVM:\n\n- `Erc20EvmTest` shows the concrete `@EVMTest` flow documented for Web3j Unit\n- when a user asks about `web3j-unit` or `web3j-evm`, point them to the test first because it is the most directly runnable path in this starter\n\n<!-- File: .agents/skills/web3j/assets/erc20-example/README.md (Tokens: ~230 | Category: anthropic-skill) -->\n# ERC20 Example Starters\n\nUse these starter assets when a user wants one example that shows how Web3j modules and companion tools fit together around an ERC20-like contract.\n\n## Templates\n\n- `basic-erc20-app/`\n  - minimal JVM-side app and test suite\n  - covers Solidity source, wrapper generation, deploy/load/call flow, typed events, and `@EVMTest`\n  - best answer for `show me a basic erc20 example`, `how do the web3j pieces fit together`, or `create a basic erc20 app`\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy `basic-erc20-app/` into the target directory\n2. keep the package names and wrapper package unless the user asks to rename them\n3. patch token metadata, endpoint defaults, or transfer env vars only if the user provided concrete values\n4. mention `web3j new` if they asked for a CLI-generated template\n5. mention `web3j_openapi` only if they want an HTTP layer on top of the same contract flow\n\n<!-- File: .agents/skills/web3j/assets/event-subscriptions/README.md (Tokens: ~252 | Category: anthropic-skill) -->\n# Event Subscription Starters\n\nUse these starter projects when a user asks for a runnable Web3j event-listening example.\n\n## Templates\n\n- `websocket-newheads/`\n  - subscribes to new block headers over WebSocket\n  - best default runnable example\n- `contract-logs/`\n  - subscribes to contract logs with `EthFilter`\n  - best when the user already has a contract address and event topic\n\n## Agent workflow\n\nWhen the user asks for a quick scaffold:\n\n1. copy the closest starter into the target directory\n2. rename the package or project only if the user cares\n3. patch the env-var defaults if the user gave a concrete endpoint or contract\n4. explain the exact env vars required to run it\n\n## Runtime expectations\n\nThese templates are minimal Gradle Java apps.\n\nTypical run commands:\n\n```sh\ngradle run\n```\n\nor, if the target project has a wrapper:\n\n```sh\n./gradlew run\n```\n\n## Environment variables\n\n### `websocket-newheads`\n\n- `WEB3J_WS_URL`\n\n### `contract-logs`\n\n- `WEB3J_HTTP_URL`\n- `WEB3J_CONTRACT_ADDRESS`\n- `WEB3J_EVENT_TOPIC0` optional\n\n<!-- File: .agents/skills/web3j/references/build-plugins.md (Tokens: ~756 | Category: anthropic-skill) -->\n# Build Plugins\n\nUse this file for prompts like:\n\n- `how do i use the web3j gradle plugin`\n- `how do i use the web3j maven plugin`\n- `generate wrappers during build`\n- `what build plugins does web3j have`\n\n## Scope\n\nWeb3j has companion build plugins outside this repo's main Java library modules.\n\nThe main plugin surfaces documented by the official docs sitemap are:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThe root `README.md` also points users to:\n\n- `web3j-maven-plugin`\n- `web3j-gradle-plugin`\n\nUse these when the user wants code generation integrated into a build rather than run manually from the CLI.\n\nThe `v5.0.3` docs also document generated-project build tasks around the CLI and OpenAPI flows. Treat those as generated-project tasks, not as proof that every task is a generic plugin feature.\n\n## When to recommend plugins\n\nPrefer a build plugin when the user wants:\n\n- contract wrapper generation as part of `build`, `compile`, or codegen phases\n- reproducible ABI/BIN-to-wrapper generation in CI\n- less manual `solc` plus CLI orchestration\n\nPrefer direct CLI commands when the user wants:\n\n- a one-off wrapper generation\n- exploration or debugging\n- minimal setup\n\n## Practical guidance\n\nThe functional goal of these plugins is the same as the CLI wrapper flow:\n\n1. compile Solidity or consume ABI/BIN artifacts\n2. generate Java wrappers\n3. place generated sources under the project source tree or generated-sources area\n\nIf the user already has a Gradle or Maven project, recommend the plugin that matches their build tool first.\n\nIf the user is not tied to a build tool yet, the CLI path is simpler to explain and is covered in `references/smart-contracts.md`.\n\nFor generated OpenAPI projects, the documented Gradle tasks include:\n\n- `generateContractWrappers`\n- `generateWeb3jOpenApi`\n- `generateWeb3jSwaggerUi`\n\nUse those only in the context of the generated project layout shown by the CLI/OpenAPI docs.\n\n## Repo-grounded context\n\nThis repo does not contain the plugin implementations themselves. It does contain the underlying code-generation logic and examples:\n\n- `README.md` links the Maven and Gradle plugins\n- `contracts/scripts/generateWrappers.sh` shows the CLI-based generation shape\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` shows the supported wrapper-generation inputs\n\n## Prompt-oriented answers\n\n### `what build plugins does web3j have`\n\nAnswer with:\n\n- Web3j Gradle plugin\n- Web3j Maven plugin\n- Solidity Gradle plugin\n\nThen ask whether the user wants:\n\n- wrappers generated during Gradle builds\n- wrappers generated during Maven builds\n- a one-off CLI alternative\n\n### `generate wrappers during build`\n\nDefault answer shape:\n\n1. identify the user's build tool\n2. recommend the matching Web3j plugin\n3. explain that it automates the same ABI/BIN-to-wrapper flow as `web3j generate solidity`\n4. if exact plugin DSL is needed, consult the plugin docs or plugin repo because that configuration lives outside this repo\n\n### `how do i generate openapi outputs during build`\n\nDefault answer shape:\n\n1. clarify whether they mean a CLI-generated OpenAPI project or a normal Gradle/Maven build\n2. if it is the generated project, point to the documented generated Gradle tasks\n3. if they want generic build-plugin DSL, do not invent it from this repo alone\n\n<!-- File: .agents/skills/web3j/references/cli.md (Tokens: ~1163 | Category: anthropic-skill) -->\n# Web3j CLI\n\nUse this file for prompts like:\n\n- `create a new project`\n- `import this project with web3j`\n- `audit this contract with web3j`\n- `create a wallet`\n- `run this generated project`\n- `generate an openapi service with web3j`\n- `send ether with the web3j cli`\n\nThis file is about the external Web3j CLI. Do not present these commands as Java library APIs.\n\n## Core commands\n\nProject scaffold:\n\n```sh\nweb3j new\n```\n\nImport a project into a CLI-managed Web3j layout:\n\n```sh\nweb3j import\n```\n\nOpenAPI project generation and packaging:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\nRun a generated project locally:\n\n```sh\nweb3j run\n```\n\nRun a generated project in Docker:\n\n```sh\nweb3j docker run [-l] <network> <wallet_path> <wallet_password>\n```\n\nCreate a wallet:\n\n```sh\nweb3j wallet create\n```\n\nUpdate a wallet password:\n\n```sh\nweb3j wallet update <walletfile>\n```\n\nSend ETH from a wallet:\n\n```sh\nweb3j wallet send <walletfile> 0x<address>|<ensName>\n```\n\nAudit a Solidity contract:\n\n```sh\nweb3j audit Campaign.sol\n```\n\nGenerate unit tests from generated wrappers:\n\n```sh\nweb3j generate tests\n```\n\n## Interpretation rules\n\n- `web3j audit` is static Solidity analysis from the CLI toolchain.\n- It is not a runtime Java API in this repo.\n- `web3j new`, `web3j import`, `web3j run`, and `web3j docker run` are shell workflows around generated projects.\n- `web3j openapi ...` commands are CLI workflows for generating or packaging OpenAPI-oriented projects, not core `org.web3j:core` APIs.\n- `wallet create`, `wallet update`, and `wallet send` are shell workflows.\n- If the user wants wallet creation inside Java code instead of the CLI, route them to `WalletUtils.generateBip39Wallet(...)`, `WalletUtils.generateNewWalletFile(...)`, or credential-loading APIs in the library.\n\nThe `v5.0.3` docs also show that `web3j new` supports named templates such as `helloworld`, `erc20`, and `erc777`, and a Kotlin option. Prefer mentioning those capabilities at a high level unless the user asks for the exact interactive flow.\n\n## Library counterpart for wallet tasks\n\nIf the user asks for Java code instead of CLI:\n\n- create encrypted wallet file:\n  - `WalletUtils.generateNewWalletFile(...)`\n  - `WalletUtils.generateLightNewWalletFile(...)`\n  - `WalletUtils.generateFullNewWalletFile(...)`\n- create BIP-39 wallet:\n  - `WalletUtils.generateBip39Wallet(...)`\n- load credentials:\n  - `WalletUtils.loadCredentials(...)`\n  - `WalletUtils.loadBip39Credentials(...)`\n\nRepo grounding:\n\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java`\n\n## Generated-project runtime configuration\n\nThe `v5.0.3` CLI docs expose these environment variables for generated projects:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_PRIVATE_KEY`\n\nFor generated OpenAPI projects, the docs also show:\n\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n\nWhen the user asks how to run the generated project, prefer these generated-project Gradle tasks from the CLI docs:\n\n- `./gradlew build`\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n- `./gradlew clean`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user is asking from a terminal-user perspective, answer with:\n\n```sh\nweb3j new\n```\n\nThen mention:\n\n- `web3j new` is for a CLI scaffold\n- `web3j import` is for bringing an existing project into the generated-project workflow\n- adding `org.web3j:core` to an existing Java project is covered in `references/getting-started.md`\n\n### `audit this contract with web3j`\n\nDefault answer:\n\n```sh\nweb3j audit MyContract.sol\n```\n\nClarify:\n\n- this performs static analysis on Solidity source\n- output includes issue location, severity, description, and rule identifier\n- it is useful before deployment, not after a contract is already on-chain\n\n### `create a wallet`\n\nDefault terminal answer:\n\n```sh\nweb3j wallet create\n```\n\nIf the user wants code instead, switch to the Java wallet APIs from `WalletUtils`.\n\n### `run this generated project`\n\nDefault terminal answer:\n\n```sh\nweb3j run\n```\n\nThen mention the generated-project environment variables or the generated Gradle tasks if they need wrapper regeneration or OpenAPI output first.\n\n### `generate an openapi service with web3j`\n\nDefault CLI answer:\n\n```sh\nweb3j openapi new\n```\n\nIf the user wants runtime configuration, generated JAR packaging, or the Kotlin client surface, route them to `references/web3j-openapi.md`.\n\n<!-- File: .agents/skills/web3j/references/contributing.md (Tokens: ~881 | Category: anthropic-skill) -->\n# Contributing\n\nUse this file for prompts like:\n\n- `how do i contribute to web3j`\n- `i found a bug in web3j`\n- `how should i submit a fix`\n- `i want to add a feature to web3j`\n- `where should i ask questions about the source code`\n\n## Scope\n\nThis file is for contributing to the Web3j library and repo itself, not for using Web3j as a dependency in an application.\n\nPrimary repo grounding:\n\n- `CONTRIBUTING.md`\n- `AGENTS.md`\n- `README.md`\n\n## Community entry points\n\nThe repo's contribution guidance highlights these community channels:\n\n- the Hyperledger Web3j community page\n- the recurring Web3j contributor call\n- the Web3j Discord channel under the Hyperledger server\n\nIf the user cannot access the Web3j Discord channel directly, the repo guidance says to join the Hyperledger Discord server first and then use the Web3j channel.\n\n## Bug reports\n\nIf the user found a bug:\n\n1. search existing GitHub issues first\n2. if an issue already exists, add useful details or signal support there\n3. if not, open a new issue with:\n   - a clear title\n   - a clear description\n   - relevant context\n   - a code sample, or preferably an executable test case\n\nBest contributor guidance:\n\n- prefer a reproducer over a vague narrative\n- if the user is already in the repo, suggest placing the reproducer near the relevant module or scenario-style tests\n\n## Bug fixes and patches\n\nIf the user already wrote a fix:\n\n1. open a pull request\n2. clearly describe the problem and the solution\n3. link the related issue when applicable\n4. run Spotless formatting before pushing\n\nRequired repo-specific reminder:\n\n```sh\n./gradlew spotlessApply\n```\n\nThe contribution guide explicitly warns that the build can fail if formatting is not applied.\n\nPair that with the repo's normal validation guidance:\n\n- run the narrowest relevant Gradle test task first\n- expand to broader validation only when needed\n\n## New features or behavior changes\n\nThe contribution guide treats feature work differently from bug fixes.\n\nIf the user wants to add a feature or make a behavior change:\n\n1. discuss the idea on Discord first\n2. wait for positive feedback\n3. only then move toward implementation and PR work\n\nImportant boundary from the repo guide:\n\n- do not open a GitHub issue first for speculative feature proposals\n- GitHub issues are mainly for bug reports and fixes\n\n## Source-code questions\n\nIf the user is asking how the source works or where to discuss implementation ideas:\n\n- direct them to the Web3j Discord channel\n- keep GitHub issues focused on actionable bugs/fixes unless maintainers ask otherwise\n\n## Contribution-ready workflow\n\nWhen an agent is helping with a contribution, the safest default flow is:\n\n1. identify whether it is a bug, patch, feature proposal, or source-code question\n2. if bug:\n   - search issues\n   - build a reproducer or executable test\n3. if fix:\n   - make the minimal patch\n   - run `./gradlew spotlessApply`\n   - run narrow tests\n   - open a PR with issue context\n4. if feature:\n   - prepare a short proposal\n   - direct the user to Discord first\n\n## Prompt-oriented answers\n\n### `i found a bug in web3j`\n\nDefault answer:\n\n1. search GitHub issues first\n2. if nothing matches, open a new issue\n3. include a minimal code sample or, ideally, an executable test case\n4. if they want help reproducing it, build that test in the relevant module\n\n### `how should i submit a fix`\n\nDefault answer:\n\n1. make the patch\n2. run:\n\n```sh\n./gradlew spotlessApply\n```\n\n3. run the narrowest relevant tests\n4. open a PR describing the problem and solution\n5. include the issue number if one exists\n\n### `i want to add a feature to web3j`\n\nDefault answer:\n\n1. discuss it on Discord first\n2. wait for positive feedback\n3. then start implementation\n\nDo not default to \"open a GitHub issue first\" for feature ideas, because that conflicts with the repo guidance.\n\n<!-- File: .agents/skills/web3j/references/erc20-example.md (Tokens: ~932 | Category: anthropic-skill) -->\n# ERC20 Example\n\nUse this file for prompts like:\n\n- `show me a basic erc20 example with web3j`\n- `create a basic erc20 web app`\n- `how do the web3j pieces fit together`\n- `show me wrappers tests and events in one example`\n- `scaffold an erc20 project with web3j`\n\n## Decision rule\n\nDecide which of these the user actually needs:\n\n1. a CLI-generated starter such as `web3j new` with the `erc20` template\n2. a repo-grounded end-to-end example that an agent can copy and adapt quickly\n3. an actual HTTP or OpenAPI surface on top of contract logic\n\nIf they want the shortest runnable example that also shows tests and events, prefer the local starter asset.\n\n## Default starter\n\nUse:\n\n- `assets/erc20-example/basic-erc20-app/`\n\nThis is the default answer for an AI agent when the user wants one example that ties together:\n\n- Solidity source under `src/main/solidity`\n- wrapper generation via the Web3j Gradle plugin\n- wrapper-based deploy, call, and transfer flows\n- typed `Transfer` event subscriptions\n- `@EVMTest`-based contract testing\n\n## What this starter covers\n\nThe starter is intentionally wrapper-first and repo-grounded.\n\nIt shows:\n\n1. an ERC20-like contract with `Transfer` and `Approval` events\n2. generated wrappers placed in a fixed package for stable imports\n3. a small JVM app that deploys the contract, reads state, sends a transfer, and listens for `Transfer` events\n4. a JUnit test using `@EVMTest` to exercise the same flow\n\nRepo grounding for the pattern:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenGeneratedIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/HumanStandardTokenIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## CLI and web-surface routing\n\nIf the user asks from a terminal-user perspective, mention that the official CLI docs already expose:\n\n```sh\nweb3j new\n```\n\nand that the published templates include `erc20`.\n\nIf the user truly wants an HTTP or browser-facing layer, this starter is still the right contract and test baseline, but route them onward to:\n\n- `references/web3j-openapi.md`\n\nfor the generated web surface.\n\n## Sokt boundary\n\nThe published `v5.0.3` docs show `web3j-sokt` as a companion compiler-wrapper library that works around:\n\n- `SolidityFile`\n- `getCompilerInstance()`\n- `SolcArguments`\n- `execute(...)`\n\nUse `references/web3j-sokt.md` when the user explicitly wants direct compiler-resolution or native `solc` invocation from code.\n\nThe local ERC20 starter keeps the shortest runnable path on the Gradle-plugin side for wrapper generation, and treats Sokt as the companion compilation surface rather than guessing extra local integration code.\n\n## Prompt-oriented answers\n\n### `show me a basic erc20 example with web3j`\n\nDefault answer:\n\n1. copy `assets/erc20-example/basic-erc20-app/`\n2. run `./gradlew test` for the `@EVMTest` flow\n3. run `WEB3J_PRIVATE_KEY=... ./gradlew run` for the deploy/call/event flow\n4. adapt token name, symbol, endpoint, and transfer defaults as needed\n\n### `create a basic erc20 web app`\n\nDefault answer:\n\n1. start from `assets/erc20-example/basic-erc20-app/` for the contract, wrappers, tests, and events\n2. if they mean CLI scaffolding, mention `web3j new` with the `erc20` template\n3. if they mean an HTTP layer, extend the same contract flow with `references/web3j-openapi.md`\n\n### `how do the web3j pieces fit together`\n\nDefault answer:\n\n1. Solidity contract source defines the ERC20 behavior\n2. the Web3j Gradle plugin generates wrappers\n3. the Java app deploys and calls the wrapper\n4. event flowables provide typed subscriptions\n5. Web3j Unit drives the `@EVMTest` contract test\n\n<!-- File: .agents/skills/web3j/references/events.md (Tokens: ~1091 | Category: anthropic-skill) -->\n# Events\n\nUse this file for prompts like:\n\n- `how do i subscribe to events with web3j`\n- `how do i subscribe to contract events with web3j`\n- `how do i watch new blocks with web3j`\n- `how do i use flowables with web3j`\n- `scaffold me a runnable event-listener example`\n- `show me a full contract example with events`\n\n## Decision rule\n\nDecide which event-listening path the user actually needs:\n\n1. contract events from a deployed contract with generated wrappers\n2. generic contract logs without wrappers\n3. node-level events such as new heads or pending transactions\n4. replaying past blocks or transactions\n\nIf the user asks for a runnable starter, prefer the closest asset under `../assets/event-subscriptions/`.\n\n## Default recommendations\n\nPrefer these paths in order:\n\n1. generated wrapper `...EventFlowable(...)` helpers for contract events\n2. `EthFilter` plus `web3j.ethLogFlowable(filter)` for generic logs\n3. `WebSocketService` plus `web3j.newHeadsNotifications()` or other Web3j flowables for push subscriptions\n\nAlways dispose the subscription when it is no longer needed.\n\n## Runnable starter assets\n\nUse these templates when the user wants a quick scaffold:\n\n- `assets/event-subscriptions/websocket-newheads/`\n  - immediate runnable example for `newHeads` subscriptions over WebSocket\n  - best answer for \"watch new blocks\", \"subscribe to new heads\", or \"show me a running example\"\n- `assets/event-subscriptions/contract-logs/`\n  - runnable generic contract-log listener using `EthFilter`\n  - best answer when the user has a contract address and event signature/topic but no generated wrapper yet\n- `assets/erc20-example/basic-erc20-app/`\n  - end-to-end contract example with wrapper generation, deploy/load/call flow, `@EVMTest`, and typed `Transfer` event subscriptions\n  - best answer when the user wants event listening as part of a fuller smart-contract workflow instead of a bare listener\n\nWhen adapting these assets, copy the nearest template and then only patch:\n\n- project name\n- package name if needed\n- endpoint defaults\n- contract address / topic env vars\n- token metadata or transfer defaults for the ERC20 starter\n\n## Wrapper-based contract events\n\nIf the user already has a generated wrapper, prefer this path:\n\n1. load the contract wrapper\n2. call `...EventFlowable(startBlock, endBlock)` or `...EventFlowable(filter)`\n3. subscribe to the returned RxJava `Flowable`\n4. dispose the subscription on shutdown\n\nRoute to `references/smart-contracts.md` for the wrapper-specific pattern.\nRoute to `references/erc20-example.md` when the user wants the event subscription embedded in a runnable deploy/interact example.\n\n## Generic logs with EthFilter\n\nIf the user does not have wrappers, use:\n\n1. `EthFilter` for block range and address\n2. `addSingleTopic(...)` or optional topics when needed\n3. `web3j.ethLogFlowable(filter)`\n4. raw log printing or manual decoding\n\nImportant notes from the docs:\n\n- filters work on indexed topics\n- omitting topics broadens the subscription\n- the docs note that filters are not supported on Infura\n\nRoute to `references/transactions.md` for lower-level filter details.\n\n## WebSocket pub/sub\n\nIf the user wants push subscriptions instead of polling:\n\n1. create `WebSocketService`\n2. connect it\n3. build `Web3j` from that service\n4. subscribe via `newHeadsNotifications()` or other flowables\n\nUse the `websocket-newheads` asset as the default runnable starter.\n\n## Repo grounding\n\nBest local sources:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrapper event helpers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\n## Prompt-oriented answers\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n1. if it is a contract event and wrappers exist, use the generated `...EventFlowable(...)` helper\n2. otherwise use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n3. for node-level push subscriptions such as new heads, use `WebSocketService`\n4. if they want a runnable starter, scaffold from `assets/event-subscriptions/`\n\n### `scaffold me a runnable event-listener example`\n\nDefault choice:\n\n- use `assets/event-subscriptions/websocket-newheads/` unless the user explicitly asks for contract logs\n- use `assets/event-subscriptions/contract-logs/` when they already have a contract address and topic or event signature\n- use `assets/erc20-example/basic-erc20-app/` when they want the event subscription to live inside a complete smart-contract example\n\n<!-- File: .agents/skills/web3j/references/getting-started.md (Tokens: ~913 | Category: anthropic-skill) -->\n# Getting Started\n\nUse this file for prompts like:\n\n- `create a new project`\n- `how do i use this library`\n- `add web3j to my java project`\n- `what module do i need`\n\n## Decision rule\n\nDecide which of these the user means:\n\n1. A brand new Web3j project scaffold from the CLI\n2. Importing or generating a CLI-managed Web3j project\n3. Adding Web3j to an existing Java project\n4. Understanding which modules and APIs to use\n\nIf the prompt is ambiguous, prefer the narrowest useful answer and mention the alternate path briefly.\n\n## New project via CLI\n\nFor a brand new project scaffold, use the Web3j CLI:\n\n```sh\nweb3j new\n```\n\nThe `v5.0.3` CLI docs show this as the project-generation entry point for Java or Kotlin scaffolds, including templates such as `helloworld`, `erc20`, and `erc777`.\n\nThis is a CLI workflow, not an in-repo Java API.\n\nIf the user is clearly asking about importing an existing contract-driven project into a generated Web3j layout, route them to the CLI workflow instead:\n\n```sh\nweb3j import\n```\n\nIf the user asks how to install the CLI first, point them to the official Web3j command-line tools docs and the project `README.md`.\n\n## Add Web3j to an existing Java project\n\nThe main dependency for standard JVM usage is `org.web3j:core`.\n\nExample Maven dependency from the repo `README.md`:\n\n```xml\n<dependency>\n  <groupId>org.web3j</groupId>\n  <artifactId>core</artifactId>\n  <version>5.0.3</version>\n</dependency>\n```\n\nExample Gradle dependency from the repo `README.md`:\n\n```groovy\nimplementation('org.web3j:core:5.0.3')\n```\n\nImportant:\n\n- The repo currently documents Java 21 for current Java binaries.\n- This repo itself is at `5.0.3-SNAPSHOT`, so if the user needs a released version, prefer the published coordinates from the docs or `README.md` rather than guessing from local snapshot state.\n- If the user is asking for OpenAPI server generation rather than a normal JVM app dependency, route them to `references/web3j-openapi.md`.\n\n## Module guidance\n\nDefault module choices:\n\n- `core`: primary JVM entry point for JSON-RPC, credentials, transactions, contract wrappers, ENS, and common Ethereum workflows\n- `abi`: low-level ABI encoding and decoding\n- `codegen`: wrapper generation utilities\n- `crypto`: key, wallet, and signing primitives\n- `contracts`: reusable EIP contract support\n- `besu`, `geth`, `parity`, `eea`: client-specific or protocol-specific surfaces\n\nRecommend `core` unless the user has a specific low-level need.\n\n## Minimal library usage pattern\n\nFor a basic Java integration, the common flow is:\n\n1. Create a `Web3j` client\n2. Load `Credentials`\n3. Use JSON-RPC APIs directly or use generated contract wrappers\n\nExample:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\n```\n\nFrom there:\n\n- for smart contracts, route to `references/smart-contracts.md`\n- for wallet CLI tasks, route to `references/cli.md`\n- for OpenAPI-generated services, route to `references/web3j-openapi.md`\n\n## Prompt-oriented answers\n\n### `create a new project`\n\nIf the user wants a Web3j scaffold:\n\n```sh\nweb3j new\n```\n\nIf they mean \"import or generate a CLI-managed project from existing artifacts\", route them to:\n\n```sh\nweb3j import\n```\n\nIf they mean \"add Web3j to my existing app\", give the `core` dependency and a minimal `Web3j.build(...)` example instead.\n\n### `how do i use this library`\n\nGive this structure:\n\n1. Add `org.web3j:core`\n2. Create a `Web3j` client\n3. Load credentials or connect read-only\n4. Use JSON-RPC directly or generate contract wrappers\n\nPoint contract questions to `references/smart-contracts.md`.\n\n<!-- File: .agents/skills/web3j/references/privacy-permissioning.md (Tokens: ~1020 | Category: anthropic-skill) -->\n# Privacy And Permissioning\n\nUse this file for prompts like:\n\n- `how do i use privacy with web3j`\n- `how do i send a private transaction with besu`\n- `how do privacy groups work`\n- `what about permissioning in a besu network`\n\n## Scope\n\nThe published `v5.0.3` docs group these topics under `Privacy & Permissioning`.\n\nIn this repo, privacy support is strongly represented by:\n\n- the `besu` module\n- the `eea` module\n- privacy-focused integration tests under `integration-tests`\n\nPermissioning is not exposed as a first-class Java helper surface in the same way privacy is, but the integration-test network configuration shows how permissioned Besu nodes are configured in practice.\n\n## Primary Java surfaces\n\nFor Besu privacy:\n\n- `org.web3j.tx.PrivateTransactionManager`\n- `org.web3j.tx.BesuPrivateTransactionManager`\n- `org.web3j.tx.LegacyPrivateTransactionManager`\n- `org.web3j.tx.gas.BesuPrivacyGasProvider`\n- `org.web3j.protocol.besu.Besu`\n- `org.web3j.protocol.besu.response.privacy.*`\n\nFor EEA/private transaction encoding:\n\n- `org.web3j.protocol.eea.Eea`\n- `org.web3j.protocol.eea.crypto.RawPrivateTransaction`\n- `org.web3j.protocol.eea.crypto.PrivateTransactionEncoder`\n- `org.web3j.utils.Base64String`\n- `org.web3j.utils.Restriction`\n\n## Recommended starting point\n\nIf the user wants application-level private transactions on Besu, start from:\n\n- a `Besu` client\n- enclave public keys / privacy participants\n- a `PrivateTransactionManager`\n- either a generated wrapper or a manually built `RawPrivateTransaction`\n\nThe `v5.0.3` docs also show on-chain privacy-group management and private smart-contract flows as first-class privacy tasks.\n\n## Repo-grounded examples\n\nStrongest examples:\n\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java`\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java`\n- `eea/src/main/java/org/web3j/protocol/eea/crypto/PrivateTransactionEncoder.java`\n- `besu/src/main/java/org/web3j/protocol/besu/Besu.java`\n\nThe privacy quickstart test demonstrates:\n\n1. creating or retrieving a privacy group\n2. building a private contract deployment transaction\n3. signing it with `PrivateTransactionEncoder`\n4. sending it with `eeaSendRawTransaction`\n5. retrieving a private receipt\n6. using `PrivateTransactionManager` with generated wrappers\n\nThe `v5.0.3` privacy docs also show privacy-group operations such as:\n\n- `privOnChainCreatePrivacyGroup(...)`\n- `privOnChainFindPrivacyGroup(...)`\n- `privOnChainAddToPrivacyGroup(...)`\n- `privOnChainRemoveFromPrivacyGroup(...)`\n\nAnd they show private contract interaction through:\n\n- `BesuPrivateTransactionManager`\n- generated wrappers loaded or deployed against a privacy group\n\n## Permissioning context\n\nFor permissioned Besu network configuration, inspect:\n\n- `integration-tests/src/test/resources/quorum-test-network/config/besu/config.toml`\n\nThis test setup shows node-permissioning configuration such as:\n\n- `permissions-nodes-config-file-enabled=true`\n- a configured permissions file path\n\nUse this as environment context, not as proof of a higher-level Web3j Java abstraction for permissioning.\n\n## Prompt-oriented answers\n\n### `how do i send a private transaction with besu`\n\nDefault answer shape:\n\n1. connect with a `Besu` client\n2. create or identify the target privacy group if needed\n3. construct a `PrivateTransactionManager` or `RawPrivateTransaction`\n4. supply enclave keys / privacy group details\n5. sign using privacy-specific encoding\n6. send and wait for a private receipt\n\nIf the user wants private smart-contract deployment, prefer the wrapper-based `BesuPrivateTransactionManager` flow after the privacy group is ready.\n\n### `how do privacy groups work`\n\nDefault answer shape:\n\n1. privacy groups define which participants can view the private state and transactions\n2. use the Besu privacy APIs to create, find, add members, or remove members\n3. once the group exists, deploy or load contracts against that group with a private transaction manager\n\n### `what about permissioning`\n\nClarify:\n\n- privacy and permissioning are related but different concerns\n- this repo provides substantial privacy APIs\n- permissioning is more visible here as Besu node/network configuration context than as a dedicated convenience layer\n\nUse the local Besu config under `integration-tests` as environment grounding, not as proof of a high-level Web3j permissioning API.\n\n<!-- File: .agents/skills/web3j/references/smart-contracts.md (Tokens: ~1499 | Category: anthropic-skill) -->\n# Smart Contracts\n\nUse this file for prompts like:\n\n- `how do i deploy & interact with smart contracts`\n- `using web3j, deploy a contract & call a function`\n- `generate wrappers for this solidity contract`\n- `call this contract method with web3j`\n- `how do i subscribe to contract events with web3j`\n\nPrefer generated wrappers first. Use raw transaction and ABI flows only when the user explicitly wants lower-level control or does not have generated wrappers.\n\n## Wrapper generation\n\nThe standard flow is:\n\n1. Compile Solidity to `.bin` and `.abi`\n2. Generate Java wrappers\n3. Use the generated class for deploy, load, call, and transact\n\nCompile with `solc`:\n\n```sh\nsolc MyContract.sol --bin --abi --optimize -o build/\n```\n\nGenerate wrappers with the Web3j CLI:\n\n```sh\nweb3j generate solidity \\\n  -b build/MyContract.bin \\\n  -a build/MyContract.abi \\\n  -o src/main/java \\\n  -p com.example.contracts\n```\n\nRepo grounding:\n\n- `contracts/scripts/generateWrappers.sh` uses the same general flow\n- `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` confirms the supported arguments, including `-a`, `-b`, `-o`, `-p`, `-c`, `-B`, and `-r`\n\n## Recommended deploy/load pattern\n\nUse a `Web3j` client, load `Credentials`, and supply a `ContractGasProvider`.\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\n        \"password\",\n        \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n```\n\nDeploy with a generated wrapper:\n\n```java\nMyContract contract = MyContract.deploy(\n        web3j,\n        credentials,\n        gasProvider\n).send();\n```\n\nLoad an existing deployment:\n\n```java\nMyContract contract = MyContract.load(\n        \"0xYourContractAddress\",\n        web3j,\n        credentials,\n        gasProvider\n);\n```\n\n## Call vs transact\n\nRead-only call:\n\n```java\nBigInteger value = contract.get().send();\n```\n\nState-changing transaction:\n\n```java\nTransactionReceipt receipt = contract.set(BigInteger.valueOf(1000)).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SimpleStorageContractIT.java` shows deploy, `set(...)`, and `get()`\n- `integration-tests/.../FunctionWrappersIT.java` shows deploy, load, return-value calls, and event extraction\n\n## Subscribe to contract events\n\nFor smart-contract event listening, prefer generated wrapper flowables before building raw log filters yourself.\n\nGenerated wrappers expose event helpers shaped like:\n\n- `transferEventFlowable(EthFilter filter)`\n- `transferEventFlowable(startBlock, endBlock)`\n\nThe generator code in this repo confirms that wrapper generation emits `...EventFlowable(...)` methods backed by `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nDisposable subscription =\n        myContract.someEventFlowable(\n                        DefaultBlockParameterName.EARLIEST,\n                        DefaultBlockParameterName.LATEST)\n                .subscribe(event -> {\n                    // use typed event fields from the generated response\n                });\n```\n\nIf you need tighter filtering, build the filter yourself and pass it to the wrapper:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                myContract.getContractAddress());\n\nDisposable subscription =\n        myContract.someEventFlowable(filter)\n                .subscribe(event -> {\n                    // handle event\n                });\n```\n\nAlways dispose the subscription when you no longer need it.\n\nRepo grounding:\n\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip20/generated/ERC20.java`\n- generated wrappers in `contracts/src/main/java/org/web3j/contracts/eip721/generated/ERC721.java`\n- wrapper-generation logic in `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapper.java`\n\nIf the user wants a single runnable example that combines wrapper generation, deployment, calls, tests, and event subscriptions, route them to `references/erc20-example.md` and the starter asset under `assets/erc20-example/basic-erc20-app/`.\n\n## Lower-level raw deployment and ABI calls\n\nUse this when the user wants raw JSON-RPC style control or no wrapper exists.\n\nKey pieces:\n\n- `RawTransaction.createContractTransaction(...)` for deployment\n- `TransactionEncoder.signMessage(...)` for signing\n- `FunctionEncoder.encode(...)` for ABI-encoding a function call\n- `ethCall(...)` for read-only execution\n- `ethSendRawTransaction(...)` for signed writes\n\nRepo grounding:\n\n- `integration-tests/.../DeployContractIT.java` shows raw contract deployment and a follow-up ABI-encoded function call\n\n## ETH transfer alongside contract work\n\nIf the user also needs to fund an account or send ETH, prefer:\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/.../SendEtherIT.java`\n\n## Prompt-oriented answers\n\n### `how do i deploy & interact with smart contracts`\n\nAnswer with:\n\n1. Compile Solidity to ABI and BIN\n2. Generate wrappers with `web3j generate solidity`\n3. Load `Web3j`, `Credentials`, and a gas provider\n4. `MyContract.deploy(...).send()`\n5. `MyContract.load(...)`\n6. Call read methods with `.send()`\n7. Send write methods with `.send()` and inspect `TransactionReceipt`\n\n### `using web3j, deploy a contract & call a function`\n\nDefault example shape:\n\n```java\nWeb3j web3j = Web3j.build(new HttpService(\"http://localhost:8545\"));\nCredentials credentials = WalletUtils.loadCredentials(\"password\", \"/path/to/keystore.json\");\nContractGasProvider gasProvider =\n        new StaticGasProvider(\n                BigInteger.valueOf(20_000_000_000L),\n                BigInteger.valueOf(6_721_975L));\n\nMyContract contract = MyContract.deploy(web3j, credentials, gasProvider).send();\nBigInteger result = contract.someViewMethod(BigInteger.TEN).send();\n```\n\nIf the user explicitly says they do not want wrapper generation, switch to the raw deployment and ABI-call pattern from `DeployContractIT`.\n\n### `how do i subscribe to contract events with web3j`\n\nDefault answer shape:\n\n1. generate or use the contract wrapper\n2. load the deployed contract\n3. call the generated `...EventFlowable(...)` helper\n4. subscribe to the returned RxJava `Flowable`\n5. dispose the subscription when done\n\nIf the user does not have wrappers, switch to the lower-level `EthFilter` plus `web3j.ethLogFlowable(...)` pattern from `references/transactions.md`.\n\n<!-- File: .agents/skills/web3j/references/transactions.md (Tokens: ~1720 | Category: anthropic-skill) -->\n# Transactions\n\nUse this file for prompts like:\n\n- `how do transactions work in web3j`\n- `how do i sign and send a transaction`\n- `how do i use eip-1559`\n- `how do i transfer ether`\n- `how do i handle nonces and gas`\n- `how do logs fit into transactions`\n- `how do i subscribe to events with web3j`\n- `what about wallet files`\n- `what about eip-7702`\n\n## Core transaction surfaces\n\nThe main transaction abstractions in this repo are:\n\n- `TransactionManager`\n- `RawTransactionManager`\n- `ClientTransactionManager`\n- `ReadonlyTransactionManager`\n- `Transfer`\n- `RawTransaction`\n- `TransactionEncoder`\n\nThe strongest repo-grounded file for local signing and send flow is:\n\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java`\n\n## Default recommendation\n\nChoose the simplest abstraction that fits:\n\n1. `Transfer.sendFunds(...)` for basic ETH transfers\n2. generated contract wrappers for contract creation, calls, and writes\n3. `RawTransactionManager` for locally signed general-purpose transactions\n4. manual `RawTransaction` plus encoder flow for low-level control\n\nThe `v5.0.3` docs explicitly separate transaction topics into:\n\n- Ether transfer\n- Smart contract creation and contract interaction\n- Wallet files and credentials\n- Logs and events\n- EIP transaction types, including `EIP-1559`, `EIP-2930`, `EIP-4844`, and `EIP-7702`\n\n## Common patterns\n\n### ETH transfer\n\n```java\nTransfer.sendFunds(\n        web3j,\n        credentials,\n        recipientAddress,\n        BigDecimal.valueOf(0.2),\n        Convert.Unit.ETHER\n).send();\n```\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n### Local signing and broadcast\n\n`RawTransactionManager`:\n\n- fetches the pending nonce\n- signs locally\n- sends via `ethSendRawTransaction`\n- verifies local and remote tx hashes\n\nUse it when the user wants explicit signing control without manually assembling every JSON-RPC call.\n\n### Manual raw transaction flow\n\nFor the most explicit control:\n\n1. build a `RawTransaction`\n2. sign with `TransactionEncoder`\n3. hex-encode it\n4. call `ethSendRawTransaction`\n\nThis pattern is visible in:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java`\n\n## Transaction topics to cover when relevant\n\n- credentials and wallet files\n- gas price vs max fee / priority fee\n- nonces\n- transaction receipts\n- chain IDs and EIP-155 signing\n- EIP-1559 transactions\n- EIP-2930 and newer transaction types if the user asks specifically\n- contract creation vs contract calls vs read-only `ethCall`\n- logs and event decoding after transactions are mined\n\n## Wallet files\n\nIf the user asks about wallet files in a transaction context, connect them to:\n\n- `WalletUtils` for wallet generation and credential loading\n- `Credentials` for signer material\n- CLI wallet workflows only if they explicitly want a shell command\n\nThe `v5.0.3` docs expose wallet files as a dedicated transaction topic, so answer wallet-file questions as part of normal transaction setup rather than treating them as a side topic.\n\n## Transactions and smart contracts\n\nThe `v5.0.3` docs separate these flows explicitly:\n\n1. transfer Ether\n2. create a smart contract\n3. transact with a smart contract\n4. query contract state with a read-only call\n\nIn this repo, the best examples remain:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n\nPrefer wrappers first, then raw ABI / raw transaction examples.\n\n## Logs and events\n\nThe `v5.0.3` docs expose Ethereum logs as a first-class transaction topic.\n\nWhen the user asks about \"what happened after my transaction\":\n\n- explain that state-changing transactions often emit logs\n- prefer wrapper-generated event response types when wrappers exist\n- otherwise decode logs from the receipt with ABI/event utilities\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` shows event extraction patterns from generated wrappers\n\n## Generic event subscriptions and flowables\n\nThe `v5.0.3` docs cover two related event-listening paths:\n\n1. polling/filter-based flowables\n2. WebSocket pub/sub subscriptions\n\nFor generic log subscriptions, the docs show `EthFilter` plus `web3j.ethLogFlowable(filter)`.\n\nTypical pattern:\n\n```java\nEthFilter filter =\n        new EthFilter(\n                DefaultBlockParameterName.EARLIEST,\n                DefaultBlockParameterName.LATEST,\n                contractAddress);\n\nfilter.addSingleTopic(EventEncoder.encode(MY_EVENT));\n\nDisposable subscription =\n        web3j.ethLogFlowable(filter)\n                .subscribe(log -> {\n                    // decode log or hand it to wrapper helpers\n                });\n```\n\nImportant notes from the docs:\n\n- topic filters only work on indexed event parameters\n- if you omit topics, you can capture all matching logs for the address/range\n- filters should be unsubscribed or disposed when no longer needed\n- the published docs note that filters are not supported on Infura\n\nFor generic chain activity, the docs and local tests also expose:\n\n- `web3j.blockFlowable(...)`\n- `web3j.transactionFlowable()`\n- `web3j.pendingTransactionFlowable()`\n- replay flowables for past blocks and transactions\n\nRepo grounding:\n\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java`\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java`\n\n## WebSocket pub/sub\n\nIf the user wants push-style subscriptions instead of polling, the docs route through `WebSocketService`.\n\nHigh-level shape:\n\n1. connect with `WebSocketService`\n2. build `Web3j` from that service\n3. subscribe via the WebSocket-backed flowable or notification helper\n4. dispose the subscription when done\n\nUse this path for prompts about:\n\n- subscribing to new heads\n- pending transactions\n- pub/sub over WebSocket\n- avoiding polling\n\n## Prompt-oriented answers\n\n### `how do i sign and send a transaction`\n\nDefault answer:\n\n- use `RawTransactionManager` if they want a reusable manager abstraction\n- use manual `RawTransaction` plus `TransactionEncoder` if they want to see every step\n\n### `how do i use eip-1559`\n\nPoint them to:\n\n- `RawTransactionManager.sendEIP1559Transaction(...)`\n\nand explain the required fields:\n\n- chain ID\n- max priority fee per gas\n- max fee per gas\n- gas limit\n- target address\n- data\n- value\n\nIf they ask about other transaction types, explain that the official `v5.0.3` docs also cover `EIP-2930`, `EIP-4844`, and `EIP-7702`, and then verify the exact helper or construction path in local source before naming a convenience API that is not already in active use here.\n\n### `how do i transfer ether`\n\nDefault to `Transfer.sendFunds(...)` unless the user explicitly wants raw transaction assembly.\n\n### `how do i subscribe to events with web3j`\n\nDefault answer:\n\n- for contract events, prefer generated wrapper `...EventFlowable(...)` helpers\n- for generic logs, use `EthFilter` plus `web3j.ethLogFlowable(filter)`\n- for node-level push subscriptions such as new heads, use a `WebSocketService` path and the Web3j flowables\n- always dispose the subscription when finished\n\n### `what about eip-7702`\n\nDefault answer shape:\n\n- the `v5.0.3` docs include `EIP-7702` as a dedicated transaction-type topic\n- treat it as a specialized transaction flow, not the default transfer or wrapper path\n- verify the exact local Web3j helper or transaction-construction API before giving a code sample beyond the high-level flow\n\n<!-- File: .agents/skills/web3j/references/web3j-eth2-client.md (Tokens: ~680 | Category: anthropic-skill) -->\n# Web3j Eth2 Client\n\nUse this file for prompts like:\n\n- `what is web3j eth2 client`\n- `how do i use the web3j beacon node client`\n- `how do i talk to an eth2 beacon node from java`\n- `how do i subscribe to beacon chain events`\n\n## Positioning\n\nThe `v5.0.3` docs include `web3j_eth2_client` as a separately documented companion library.\n\nTreat it as an adjacent Web3j ecosystem library, not as part of this repo's main `core` / `abi` / `crypto` module set.\n\n## What the docs show\n\nThe docs describe it as a Beacon Node API client for interacting with Eth2 / Beacon Chain nodes through the Eth2 API specification, including event subscriptions.\n\nThe documented artifact is separate from `org.web3j:core`:\n\n```xml\n<dependency>\n    <groupId>org.web3j.eth2</groupId>\n    <artifactId>beacon-node-api</artifactId>\n    <version>1.0.0</version>\n</dependency>\n```\n\nImportant:\n\n- this dependency is versioned separately from `org.web3j:core:5.0.3`\n- do not replace it with core Web3j coordinates\n\n## Basic client shape\n\nThe docs show this usage pattern:\n\n1. create a `BeaconNodeService`\n2. build the client with `BeaconNodeClientFactory.build(...)`\n3. call typed Beacon API resources from the client\n\nExample shape from the docs:\n\n```java\nvar service = new BeaconNodeService(\"http://...\");\nvar client = BeaconNodeClientFactory.build(service);\n```\n\nThen use the Beacon API resources, for example:\n\n- `client.getBeacon().getBlocks().findById(...)`\n- `client.getBeacon().getPool().getAttesterSlashings().findAll()`\n\n## Event subscriptions\n\nThe docs explicitly describe event subscriptions as part of the client surface.\n\nDocumented high-level flow:\n\n1. create the client\n2. choose event topics\n3. subscribe with the event API\n4. wait for callbacks or latch completion in test/demo code\n\nIf the user asks about listening for events, explain that the docs show Beacon event subscriptions as a native capability of this client rather than something built on the main `Web3j` JSON-RPC client.\n\n## Local test network context\n\nThe docs show a local Teku-based test-network example for trying the Beacon client against local nodes.\n\nUse that as ecosystem guidance, not as a statement that this repo contains the Eth2 test-network implementation.\n\n## Repo boundary\n\nThis repo does not contain a top-level `web3j-eth2` module implementing this client.\n\nSo:\n\n- do not invent local imports or modules from this repo\n- do not claim `org.web3j:core` directly exposes Beacon Node APIs\n- do use the official `v5.0.3` docs guidance when the user explicitly asks about the Eth2 client\n\n## Safe default response\n\nDescribe the Web3j Eth2 client as a separate Beacon Node API client library, then offer one of these directions:\n\n- add the `beacon-node-api` dependency\n- create a client and query Beacon data\n- subscribe to Beacon events\n- connect the client to a local test network\n\n<!-- File: .agents/skills/web3j/references/web3j-evm.md (Tokens: ~399 | Category: anthropic-skill) -->\n# Web3j EVM\n\nUse this file for prompts like:\n\n- `what is web3j evm`\n- `how do i use web3j evm`\n- `run contracts against a local evm with web3j`\n\n## Positioning\n\n`web3j_evm` appears in the official `v5.0.3` docs sitemap as a separate documentation area.\n\nTreat it as companion tooling in the broader Web3j ecosystem, not as a core module implemented in this repo.\n\n## Practical routing\n\nFor most users asking how to run or test contracts against a local EVM, the most useful runnable path in this repo context is:\n\n- `references/web3j-unit.md`\n- `assets/erc20-example/basic-erc20-app/`\n\nThat path gives them a concrete `@EVMTest` example without inventing a separate local `web3j-evm` API surface.\n\n## Safe boundaries\n\nThis repo does not have a clearly named `web3j-evm` module. Do not invent:\n\n- local module coordinates\n- APIs\n- config blocks\n- test harness calls\n\nunless the user provides them from their own project or the dedicated docs are consulted.\n\n## How to help anyway\n\nIf the user asks about Web3j EVM, clarify whether they want:\n\n- a lightweight local execution environment\n- testing support for contracts and transactions\n- integration with existing Web3j Java code\n\nThen connect it back to the main repo concepts they will still use:\n\n- `Web3j` clients\n- credentials\n- transaction flows\n- generated wrappers\n- `@EVMTest` or `@EVMComposeTest` when the actual goal is testing\n\n## Safe default response\n\nDescribe Web3j EVM as a companion ecosystem topic around local or controlled EVM execution for Java-based workflows, then ask which concrete task they want:\n\n- deploy a contract\n- run tests\n- simulate transactions\n\n<!-- File: .agents/skills/web3j/references/web3j-openapi.md (Tokens: ~850 | Category: anthropic-skill) -->\n# Web3j OpenAPI\n\nUse this file for prompts like:\n\n- `what is web3j openapi`\n- `how do i use web3j openapi`\n- `generate an openapi service with web3j`\n- `how do i run a web3j openapi server`\n- `how do i call a web3j openapi server`\n\n## Positioning\n\n`web3j_openapi` is a separately documented Web3j ecosystem surface in the `v5.0.3` docs. It is not one of the main runtime modules in this repo like `core`, `abi`, or `crypto`.\n\nTreat it as generated-project and companion-tooling guidance, not as a core `org.web3j:core` package.\n\n## What the docs support\n\nThe `v5.0.3` docs support these broad workflows:\n\n- generate an OpenAPI-oriented project from the CLI\n- package or generate server artifacts\n- configure runtime parameters through CLI args, config files, or environment variables\n- run the generated server with Gradle, an executable distribution, or a JAR\n- call the generated server through the Web3j OpenAPI Kotlin/Java client\n- handle contract events through Server-Sent Events\n\nCore CLI entry points called out in the docs:\n\n```sh\nweb3j openapi new\nweb3j openapi import\nweb3j openapi jar\nweb3j openapi generate\n```\n\n## Runtime configuration\n\nThe docs describe three configuration paths for generated OpenAPI servers:\n\n1. CLI arguments\n2. a config file\n3. environment variables\n\nImportant environment variables from the docs:\n\n- `WEB3J_ENDPOINT`\n- `WEB3J_PRIVATE_KEY`\n- `WEB3J_WALLET_PATH`\n- `WEB3J_WALLET_PASSWORD`\n- `WEB3J_OPENAPI_NAME`\n- `WEB3J_OPENAPI_CONTRACT_ADDRESSES`\n- `WEB3J_OPENAPI_HOST`\n- `WEB3J_OPENAPI_PORT`\n- `WEB3J_OPENAPI_CONFIG_FILE`\n\n## Build and run paths\n\nThe docs show these generated-project run and packaging patterns:\n\n- `./gradlew run`\n- `./gradlew shadowJar`\n- `./gradlew installShadowDist`\n\nFor CLI-generated projects, the command-line docs also show generated tasks such as:\n\n- `./gradlew generateContractWrappers`\n- `./gradlew generateWeb3jOpenApi`\n- `./gradlew generateWeb3jSwaggerUi`\n\n## Client usage\n\nThe `v5.0.3` docs show the OpenAPI client as a separate dependency:\n\n```groovy\nimplementation \"org.web3j.openapi:web3j-openapi-client:5.0.3\"\n```\n\nThe documented client shape is:\n\n- create a `ClientService`\n- create the app client with `ClientFactory.create(...)`\n- call generated contract resources from the typed API\n- use SSE helpers for event subscriptions\n\n## Repo boundary\n\nThis repo does not expose a top-level `openapi` module in the same way it exposes `core`, `abi`, or `crypto`.\n\nSo:\n\n- do not invent local classes or configuration blocks\n- do not pretend `org.web3j:core` directly provides the OpenAPI server/client toolchain\n- do treat it as official Web3j companion tooling documented in `v5.0.3`\n\n## Recommended answer pattern\n\nIf a user asks how to use Web3j OpenAPI:\n\n1. clarify whether they want server generation, runtime configuration, packaging, or client usage\n2. answer with the CLI-generated-project path first\n3. separate server-generation guidance from client-consumption guidance\n4. only connect back to `org.web3j:core` when the question is about the contract logic behind the generated service\n\n## Safe default response\n\nDescribe Web3j OpenAPI as a separately documented Web3j toolchain for generating and running blockchain-backed OpenAPI services, then offer one of these directions:\n\n- scaffold a service\n- configure and run the generated server\n- use the Kotlin/Java client\n- subscribe to contract events via SSE\n\n<!-- File: .agents/skills/web3j/references/web3j-sokt.md (Tokens: ~460 | Category: anthropic-skill) -->\n# Web3j Sokt\n\nUse this file for prompts like:\n\n- `what is web3j sokt`\n- `how do i use web3j sokt`\n- `set up sokt with web3j`\n\n## Positioning\n\n`web3j_sokt` appears in the official `v5.0.3` docs as a separate documentation area.\n\nTreat it as a companion Web3j ecosystem tool, not as something implemented inside this repo's main Java modules.\n\n## What the `v5.0.3` docs show\n\nThe published docs describe Sokt as:\n\n- a Kotlin wrapper around `solc`\n- a tool that can resolve the ideal compiler version from the Solidity `pragma`\n- a native compiler runner for Mac, Windows, and Linux x86/64\n\nThe docs show this dependency coordinate:\n\n- `org.web3j:web3j-sokt:0.2.1`\n\nAnd they show this concrete usage shape:\n\n1. create a `SolidityFile`\n2. call `getCompilerInstance()`\n3. execute the compiler with `SolcArguments`\n4. inspect `SolcOutput`\n\n## Safe boundaries\n\nThis repo still does not expose a clearly named `sokt` module. Because of that:\n\n- do not infer local classes or imports\n- do not claim it is part of `core`, `abi`, `crypto`, or `codegen`\n- do not invent extra build-tool wiring beyond what the dedicated docs explicitly provide\n\n## How to answer\n\nIf the user explicitly names Web3j Sokt:\n\n1. acknowledge it as the dedicated compiler-resolution and `solc` helper\n2. ask whether they want direct compiler usage or wrapper generation in a build\n3. if they want a runnable wrapper-first project, route them to `references/erc20-example.md`\n4. if they want the direct compiler API, answer with the docs-backed `SolidityFile -> getCompilerInstance() -> execute(...)` flow\n\n## Safe default response\n\nSay that Web3j Sokt is the companion compiler wrapper for resolving and running `solc`, and distinguish it from the Gradle-plugin wrapper-generation path used in `assets/erc20-example/basic-erc20-app/`.\n\n<!-- File: .agents/skills/web3j/references/web3j-unit.md (Tokens: ~781 | Category: anthropic-skill) -->\n# Web3j Unit\n\nUse this file for prompts like:\n\n- `how do i use web3j unit`\n- `how do i test web3j code`\n- `how do i run blockchain integration tests in java`\n\n## Positioning\n\n`web3j-unit` is the separately documented testing companion for Web3j and JUnit 5.\n\nRepo grounding:\n\n- `integration-tests/build.gradle` includes `testImplementation(\"org.web3j:web3j-unit:$web3jUnitVersion\")`\n- the root build defines `web3jUnitVersion`\n- test configuration enables JUnit Jupiter extension autodetection\n\nThis indicates Web3j Unit is the preferred testing companion when the user wants JVM-side blockchain integration tests.\n\n## What the `v5.0.3` docs show\n\nThe docs describe Web3j Unit as a JUnit 5 extension that supports:\n\n- embedded EVM tests\n- dockerized node tests\n- out-of-the-box node support for Geth, Besu, and OpenEthereum\n- docker-compose-based multi-node setups\n\nThe docs explicitly show these annotations:\n\n- `@EVMTest`\n- `@EVMComposeTest`\n\nAnd they explicitly show test-method injection of:\n\n- `Web3j`\n- `TransactionManager`\n- `ContractGasProvider`\n\nThey also show a contract deployment example using a generated `Greeter` wrapper.\n\n## Important version note\n\nThe `v5.0.3` docs page still shows older example dependency coordinates in its sample snippet. For version-sensitive answers, prefer:\n\n- this repo's actual `web3jUnitVersion` usage for local implementation context\n- the published `v5.0.3` docs for the API shape and testing workflow\n\n## Recommended answer pattern\n\nFor a user asking how to test with Web3j Unit:\n\n1. add `web3j-unit` as a test dependency\n2. keep Web3j core modules in normal dependencies\n3. use JUnit 5\n4. choose `@EVMTest` for embedded or single-node tests\n5. choose `@EVMComposeTest` for docker-compose-backed environments\n6. model deployment and interaction tests after this repo's integration tests\n\nThe best local examples for contract and transaction behavior are still:\n\n- `FunctionWrappersIT`\n- `SimpleStorageContractIT`\n- `DeployContractIT`\n- `SendEtherIT`\n\nFor an AI-facing starter that combines wrappers, events, and `@EVMTest` in one place, prefer:\n\n- `assets/erc20-example/basic-erc20-app/`\n\n## Concrete usage shape\n\nFor `@EVMTest`, the docs show this pattern:\n\n1. annotate the test class with `@EVMTest`\n2. optionally select a node type such as Geth or Besu\n3. inject `Web3j`, `TransactionManager`, and `ContractGasProvider` into the test method\n4. deploy and call a generated wrapper in the test\n\nFor `@EVMComposeTest`, the docs show this pattern:\n\n1. annotate the class with `@EVMComposeTest(...)`\n2. optionally provide compose file path, service name, and port\n3. inject the same Web3j test dependencies into the method\n4. deploy and interact with the contract in the compose-backed environment\n\nThe docs also point to sample projects:\n\n- `web3j-unitexample`\n- `web3j-unit-docker-compose-example`\n\n## Safe default response\n\nSay that Web3j Unit is the JUnit 5 testing companion for Web3j, and then offer one of these directions:\n\n- adding the dependency to a Gradle or Maven test scope\n- writing an `@EVMTest` contract deployment test\n- writing an `@EVMComposeTest` docker-backed test\n\n<!-- File: .agents/skills/web3j/SKILL.md (Tokens: ~1451 | Category: anthropic-skill) -->\n---\nname: web3j\ndescription: 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.\n---\n\n# Web3j\n\nThis skill is for AI agents helping users consume the Web3j library and CLI.\n\nTreat Web3j as two separate interfaces:\n\n- Java library usage inside application code\n- Web3j CLI usage from the shell\n\nDo 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.\n\n## Routing\n\n- For contributing to the Web3j library itself, including bug reports, fixes, feature proposals, formatting, PR expectations, and community discussion paths, read [references/contributing.md](references/contributing.md).\n- For project setup, dependency selection, module guidance, and \"how do I use this library\", read [references/getting-started.md](references/getting-started.md).\n- For end-to-end ERC20 examples that show how CLI scaffolding, wrapper generation, interaction, tests, and events fit together, read [references/erc20-example.md](references/erc20-example.md).\n- For event subscriptions, filters, flowables, WebSocket pub/sub, and runnable starter examples, read [references/events.md](references/events.md).\n- For smart contract wrapper generation, deployment, loading, calling, sending transactions, contract event subscriptions, and raw transaction fallbacks, read [references/smart-contracts.md](references/smart-contracts.md).\n- For `web3j new`, `web3j import`, `web3j run`, `web3j docker run`, `web3j wallet create`, `web3j wallet update`, `web3j wallet send`, `web3j audit`, and OpenAPI-oriented CLI scaffolding, read [references/cli.md](references/cli.md).\n- For Gradle and Maven plugin workflows, read [references/build-plugins.md](references/build-plugins.md).\n- For private transactions, Besu/EEA privacy APIs, and permissioned-network configuration context, read [references/privacy-permissioning.md](references/privacy-permissioning.md).\n- For transaction managers, signing, gas, nonces, EIP transaction types, wallet files, ETH transfers, generic log filters, and block/transaction flowables, read [references/transactions.md](references/transactions.md).\n- For the broader Web3j ecosystem tools named directly by the user, read:\n  - [references/web3j-eth2-client.md](references/web3j-eth2-client.md)\n  - [references/web3j-openapi.md](references/web3j-openapi.md)\n  - [references/web3j-unit.md](references/web3j-unit.md)\n  - [references/web3j-evm.md](references/web3j-evm.md)\n  - [references/web3j-sokt.md](references/web3j-sokt.md)\n\n## Repo-grounded examples\n\nWhen you need canonical implementation patterns, prefer these local sources:\n\n- `README.md` for published dependency coordinates, Java version expectations, and high-level positioning\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/FunctionWrappersIT.java` for generated wrapper deploy/load/call patterns\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/DeployContractIT.java` for lower-level raw contract deployment and ABI calls\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/SendEtherIT.java` for ETH transfers and `Transfer.sendFunds`\n- `integration-tests/src/test/java/org/web3j/protocol/core/FlowableIT.java` for block, transaction, pending-transaction, log, and replay flowables\n- `integration-tests/src/test/java/org/web3j/protocol/scenarios/EventFilterIT.java` for manual `EthFilter`-based event filtering and log decoding\n- `core/src/main/java/org/web3j/crypto/WalletUtils.java` for wallet creation and credential loading APIs\n- `core/src/main/java/org/web3j/tx/RawTransactionManager.java` for local signing and raw transaction broadcast patterns\n- `integration-tests/build.gradle` for `web3j-unit` usage in this repo's test setup\n- `integration-tests/src/test/java/org/web3j/protocol/besu/BesuPrivacyQuickstartIntegrationTest.java` for private transaction and privacy group flows\n- `besu/src/main/java/org/web3j/tx/PrivateTransactionManager.java` and `eea/src/main/java/org/web3j/protocol/eea/crypto/RawPrivateTransaction.java` for privacy APIs\n- `contracts/scripts/generateWrappers.sh` and `codegen/src/main/java/org/web3j/codegen/SolidityFunctionWrapperGenerator.java` for wrapper-generation CLI shape\n\n## Working rules\n\n- Prefer concise, copyable answers.\n- Separate \"library code\" from \"CLI commands\" with explicit headings when both are relevant.\n- If the user asks to create a new project, first decide whether they mean:\n  - a CLI-scaffolded Web3j project\n  - a CLI import or generated-project workflow\n  - adding Web3j to an existing Maven or Gradle Java project\n- If the user asks how to contribute to Web3j itself, first decide whether they mean:\n  - report a bug\n  - submit a fix\n  - propose a feature\n  - ask a source-code question\n- For dependency coordinates and install steps, prefer official published usage from the docs and `README.md`.\n- For implementation details, prefer this repo's source and integration tests.\n- When showing smart contract usage, default to generated wrappers first and raw ABI / raw transaction flows second.\n- 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/`.\n- 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.\n- When answering audit questions, make clear that `web3j audit` is static analysis from the CLI toolchain, not a Java runtime API.\n- 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.\n- 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.\n</yakaai_skills>"}