Lightweight Java and Android library for integration with Ethereum clients
OTHER License
Bot releases are visible (Hide)
Published by snazha-blkio almost 6 years ago
Published by snazha-blkio almost 6 years ago
This release contains the core set of changes in the 4.0.0-alpha-1 release and some other features/fixes:
Migrate from rxJava1 to rxJava2: #482
BIP-44 implementation: #686
Improvements to the Solidity code generation: #672
Remove deprecated methods: #508
Improve implementation of MnemonicUtils: #665
Update to CLI usage string: #660
Updated OkHttp CipherSuites to include all INFURA CiperSuites: #757
Remove *.bin file requirement for contract wrapper generation: #408
Prefix message signing according to eth_sign: #761
Support for Pantheon specific RPC calls #792
Exception logging and format #746, #784, #785
NPE for logs without topics #708
NPE when an error is encountered before a listener is set #731
Allow use of java keywords as solidity function names #776
Add support for CLEARTEXT HTTP communication #718
Publish/subscribe documentation for #458 - #768
Support for Pantheon RPC calls #767
Fix invalid index error on node disconnection #713
Make "crypto" module less dependent on 3rd party libraries (ease Android integration) #618
Change visibility of some methods to ease hardware integration #679
Published by snazha-blkio almost 6 years ago
This release contains the following fixes/changes:
Published by snazha-blkio about 6 years ago
This release contains some community-driven fixes that can be found in the following pull requests.
Published by conor10 about 6 years ago
This release contains a number of enhancements from the community:
We're trying to hire someone full-time to work on web3j, so if you fancy driving its development going forwards, please get in touch.
Published by conor10 over 6 years ago
The 3.4 release of web3j provides some awesome new functionality.
Although web3j does provide the ability to modify the gas price and limit on transactions, it was performed in a relatively inflexible manner, where a setter was used to modify it on smart contracts. web3j now supports a ContractGasProvider interface which can be used for specifying gas price and limits dynamically on a per contract call basis.
For more information refer to the docs
Thanks to @yuriymyronovych for this great enhancement.
It's now possible to work with multi-dimensional arrays in the smart contract wrappers.
Thanks to @fergarrui for this great update.
There's been a significant number of community contributions these are all listed below, which is a great testament to the ever growing web3j community!
Special thanks to @fcorneli, @mushketyk and @iongchun for all of their input here.
The following issues have been resolved:
Published by iikirilov over 6 years ago
See v3.3.1 release notes.
Published by conor10 over 6 years ago
This release addresses a codegen issue which resulted in non-Android compatible smart contract wrappers being generated.
This only affected smart contracts returning array values.
Published by iikirilov over 6 years ago
There are some great new features in this milestone release.
This release provides a number of minor bug fixes, including:
Published by conor10 almost 7 years ago
This release provides a workaround for the connection timeout issues being experienced by users connecting to the Ethereum node when using filters (which are the enablers for the Observables API). Details of the fix are available in https://github.com/web3j/web3j/pull/280, and the following issues, are useful for background https://github.com/web3j/web3j/issues/144, https://github.com/web3j/web3j/issues/279, https://github.com/web3j/web3j/issues/197.
It also provides ERC20 interfaces, which are a building block for the following issue which hopefully will be implemented in the near future. This is detailed in PR https://github.com/web3j/web3j/pull/239. Thanks to @eepstein for his contributions so far.
Published by conor10 almost 7 years ago
Please refer to the v3.1.1 release notes.
Published by conor10 almost 7 years ago
This release addresses a couple of issues:
Published by conor10 almost 7 years ago
web3j now supports Ethereum Name Service (ENS) lookups for contract and wallet addresses.
This means that anywhere you previously had to use a contract or wallet address, you can now use an ENS domain name instead.
I.e. For your smart contracts you can use:
YourSmartContract contract = YourSmartContract.load(
"0x<address>|<ensName>",
web3j, credentials, GAS_PRICE, GAS_LIMIT);
It also is supported in web3j’s command line tools:
$ web3j wallet send <walletfile> 0x<address>|<ensName>
The Truffle Framework is a very popular choice for both JavaScript and Solidity developers alike. Truffle provides a contract schema in JSON to represent contracts deployed to the various Ethereum networks.
web3j can now work with Truffle JSON files for generating smart contract wrappers. This means that if you currently or have used Truffle for your smart contract development, you can generate smart contract wrappers in Java from them.
The advantage of this approach is that your smart contracts will know where they’ve been deployed previously.
YourSmartContract contract = YourSmartContract.load(
YourSmartContract.getDeployedAddress(<network id>),
web3j, credentials, GAS_PRICE, GAS_LIMIT);
Where the network id is as per EIP 155.
To generate the wrapper files, there is a new truffle argument to the web3j command line tool:
$ web3j truffle generate [--javaTypes|--solidityTypes] /path/to/<truffle-smart-contract-output>.json -o /path/to/src/main/java -p com.your.organisation.name
@eepstein deserves the credit for this change, as he had the idea and implemented it.
Published by conor10 almost 7 years ago
See v3.0.1 for release notes.
Published by conor10 almost 7 years ago
Following months of development, just in time for Devcon 3 the web3j 3.0 milestone release has dropped. This release provides numerous enhancements aimed at making it even easier to work with Ethereum and smart contracts in JVM languages.
Modular
web3j is now a modular project. For each web3j release, a number of artifacts are published:
The motivation here is to give developers (especially Android) more choice on which parts of the library they wish to use. My hope is also that this will encourage standardisation and reuse throughout the Ethereum ecosystem for those developers building on the JVM, so that these libraries are not being reimplemented time and time again in different projects.
For almost all use cases, if you were using web3j core previously you shouldn't have any problems dropping in the 3.0 core. Behind the scenes, there's been some refactoring, but much of the same functionality is there. You will need to regenerate your smart contract wrappers to use this release.
Native Java types in smart contract wrappers
web3j's smart contract wrappers now use native Java types by default. This means that the following Java to Solidity type conversions take place behind the scenes for you:
boolean -> bool
BigInteger -> uint/int
byte[] -> bytes
String -> string and address types
List<> -> dynamic/static array
This significantly reduces the amount of code you write, but still offers the same protection with native Solidity types in Java behind the scenes.
Updated API for remote calls
web3j previously provided async methods on its smart contract wrappers that returned a future. A new RemoteCall type is now returned, which makes it easy to choose if you want to make a remote call to an Ethereum client synchronously, asynchronously (via a CompletableFuture in Java, or Future in Android), or an Observable.
As mentioned previoysly, this does mean that you'll need to regenerate your smart contract wrappers to use web3j 3.0, but the upside is that you have a much cleaner API, and can take advantage of the numerous smart contract wrapper enhancements that came with the 3.0 release.
Migration to OkHttp
web3j now uses the excellent OkHttp library for all HTTP communication.
Parity and Geth JSON-RPC support
All of the Geth and Parity specific personal module calls are now available in web3j. Additionally web3j also supports the Parity trace module.
Thanks to @iikirilov for submitting this change.
Tuples for multiple return values in smart contracts
web3j now provides a simple Tuple type which is used by its smart contract wrappers that return multiple values. Previously this was done with lists which required casting to the correct type if there were different types returned by the method.
Transaction receipt processors
web3j provides an abstraction layer for working with Ethereum transactions whereby when you submit a transaction to the network, it continually polls your Ethereum node for a transaction receipt passing this back to the caller once one is available, indicating the transaction has been mined and placed into a block on the network.
With the 3.0 release you are able to modify how web3j polls for transactions. The default behaviour still remains the same. However, should you want to have lots of transactions in flight, web3j provides a queue that can be used to poll for those transactions, reducing the number of threads being created by the library.
You can read more here.
Transaction signing via third parties
The transaction signing logic has been refactored allowing the signing of transactions via third parties (previously it had to be performed in web3j). This means that if you want to call out to an HSM or wallet from web3j you can.
Thanks to @eztierney for submitting this change.
Documentation updates
All web3j documentation has been updated to reflect the changes to the library. If you find a broken link, or any discrepancies, please raise an issue, or better yet create a PR :) with details of what's wrong. I want to keep the standard of documentation for the library high (having invested heavily in it), so any feedback is gratefully received.
Other changes
Please accept my apologies if I've missed your contribution of the list - pull requests and issues are one of the main mechanisms to get feedback from users on the library, so I appreciate people taking the time to submit them.
Published by conor10 almost 7 years ago
See v3.0.0 for release notes.
Published by conor10 about 7 years ago
This release fixes NullPointerException after transactionObservable().subscribe
(https://github.com/web3j/web3j/issues/152).
Published by conor10 about 7 years ago
This release contains a number of fixes and enhancements to web3j.
Enhancements:
Bug fixes: