Practical overview
When it fits
Use it when an Ethereum application written in ClojureScript needs Web3 API access, smart-contract operations or asynchronous client calls.
Who it is for
- ClojureScript developers building Ethereum decentralized applications.
- Developers who need to connect ClojureScript interfaces to injected wallets or HTTP Web3 providers.
- Teams writing asynchronous Ethereum client workflows with core.async.
Documented uses
- Call Ethereum Web3 methods from ClojureScript using kebab-cased function names.
- Create a provider-backed Web3 instance from an injected provider or HTTP URL.
- Create contract instances, call contract methods, retrieve call data and deploy contracts.
- Handle asynchronous Web3 responses with callbacks or core.async channels.
- Control a testrpc server using the library's EVM namespace.
Requirements & limits
The repository specifies the EPL-1.0 license. The README lists the dependency version 0.19.0-0-11.
- The library adapts Web3 methods to kebab-cased ClojureScript functions and keywordized callback results.
- Provider setup can use an injected Web3 provider or an HTTP provider URL.
- The README documents both callback and cljs.core.async interfaces.
- The README says cljsjs.web3 is needed when not using the MetaMask extension or Mist browser.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add cljs-web3 to a ClojureScript namespace
Set up a namespace to use cljs-web3’s Ethereum Web3 API wrappers.
Before you start
- A ClojureScript project with a dependency configuration.
- For a provider other than the MetaMask extension or Mist browser, include cljsjs.web3.
Steps
Add
[cljs-web3 "0.19.0-0-11"]to the project dependencies.In the application namespace, require the cljs-web3 namespaces needed for the Web3 areas the application will use, such as
cljs-web3.coreandcljs-web3.eth.When not using MetaMask or Mist, also require
cljsjs.web3.
Expected outcome
The namespace is configured to reference cljs-web3 functions for Ethereum Web3 API methods.
Guide limitations
- This covers dependency and namespace setup only; it does not describe configuring a project build or verifying the setup.
- The README marks cljsjs.web3 as needed only when not using MetaMask or Mist.
Create a Web3 instance and call a contract method
Use cljs-web3 to create a provider-backed Web3 instance and call a method on an already deployed contract.
Before you start
- cljs-web3 is added to the project and its core and eth namespaces are required.
- An injected Web3 provider from Mist or MetaMask, or an HTTP provider URL.
- The contract ABI, deployed contract address, and method arguments.
Steps
Create a Web3 instance using
(web3/web3)for injected Web3, or(web3/create-web3 "http://localhost:8545/")for the documented HTTP-provider example.Create an instance of the deployed contract with
(web3-eth/contract-at web3 abi address).Call a contract method with
(web3-eth/contract-call ContractInstance :multiply 5), replacing the example method and argument with the desired ones.
Expected outcome
A contract method call is issued through the cljs-web3 wrapper using the created contract instance.
Guide limitations
- The example uses a placeholder localhost HTTP URL; it does not provide provider setup or connection verification.
- The method name and argument shown are illustrative; ABI, address, and valid method arguments must be supplied by the application.
- The README does not specify the returned result or error handling for this call.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- district0x/cljs-web3 · Official homepage title · retained in its source language

