Releases: hyperledger-web3j/web3j
Dynamic Gas Support (v3.4.0)
The 3.4 release of web3j provides some awesome new functionality.
Dynamic gas price providers
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.
Multi-dimensional arrays
It's now possible to work with multi-dimensional arrays in the smart contract wrappers.
Thanks to @fergarrui for this great update.
Other enhancements
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.
- Projects: ethereum-tool and ethereum-resource-adapter #517
- fix status check on contract transactions #509
- rename isHashed to needToHash #504
- allow external BC lifecycle management #503
- Read word list as stream and throw possible error earlier #498
- Fix simultaneous requests for UNIX IPC #494
- isStatusOK on TransactionReceipt #493
- Transaction decoder #491
- Compare hex transaction status as real ints not as pure strings. #483
- Allow transaction receipts to have "null" status #479
- getChainId on Transaction #478
- deployRemoteCall public #475
- Resource conflict with other libraries #468
- Add AUR as an install option for cli #465
- Admin build with ScheduledExecutorService #464
- transactionHash instead of blockHash #463
- Adds methods "miner_start" and "miner_stop" #462
- added PollingTransactionReceiptProcessorTest (#237) #460
- import test dependencies from testArtifacts rather than archives. #455
- Fix JsonRpc2_0Geth protections #453
- make V long to support larger ChainId #451
- Throw exception if contract deployment or transaction runs out of gas #444
- deserialize json object in error response data field #443
- Outputs a warning when non-constant function returns a value #436
- Adds web3j shutdown method #433
- fix for transaction not always being present #430
- Make "recoverFromSignature" method public #424
- add rpc:parity_listAccounts which "Returns all addresses if Fat DB is… #407
- adds a close method on IPC service #397
- query for historical contract state #388
- Expose additional behaviors from auto-generated contract classes for use with ethGetLogs #387
- changed the ordering of nonIndexedParameter and indexParameters to ensure proper sha3 hash can be created #326
- Improvement for UNIX domain socket #245
The following issues have been resolved:
- 你好,你们的代码是怎么运行的?? #516
- build contract :Empty value (0x) returned from contract #515
- how to pass array parameters with web3j? #514
- OOM Issue Solution !!! #512
- web3j solidity eth transfer #507
- How to Decoding transaction input data #489
- why not-enough gas? #477
- BigInteger out of int range #473
- SendFunds this method callback is especially slow #466
- Unable to make transaction using admin.personalSendTransaction method. #456
- java.lang.OutOfMemoryError on android #448
- PendingTransactionFilter: transactionHash instead of blockHash #447
- org.web3j.protocol.exceptions.TransactionException: Error processing request: unknown transaction #446
- Error processing transaction request: exceeds block gas limit #445
- Exception thrown when deserializing error response from testrpc #442
- The filter cann't work at all after the geth client shutdown and restart ? #438
- Writing operations on a contract always throw "java.lang.ArrayIndexOutOfBoundsException" #431
- eth_uninstallFilter invoked after a while #429
- web3j.transactionObservable().subscribe(tx -> { #423
- how to connect to the etheric lane on the main network #422
- how to obtain a a wallet address all of the transaction records #421
- mnemonic get wallet info #419
- change the password web3j #418
- hew to send ether in decimal e.g 0.00169 ether ? #417
- How to get the return value of smart contract method in web3j? #416
- filter dont give response #414
- How to get all subscribed transaction events continuously until the program is stopped #412
- Invalid response received: okhttp3.internal.http.RealResponseBody@41f30eb2 #411
- A problem with transaction logs #410
- support more parity rpc calls #406
- java.lang.IndexOutOfBoundsException #403
- Invalid contract wrapper generated - "EventValuesWithLog" is missing #401
- I have a problem with connecting the main net. #394
- closing UnixIpcService #393
- Support for WebSocket to listen Log Events #392
- some classes doesn't exist. #389
- Webj code generation doesn't handle solidty functions that return arrays #384
- Transaction receipt in 0 #383
- How to execute miner.start() using web3j? #381
- Deploy Newest Version of Android Library #379
- Generated Contract Java File Error #369
- Resource conflict with other libraries #365
- Unlock wallet address with private key #362
- can't find wallet file on Mac OSX #344
- WalletUtils.generateBip39Wallet fails when library is used as .jar in a project #343
- Restore private key from seed #340
- No exception when transaction is pending. #336
- SafeVarargs & OOM #312
- java generated code do not compile due to List.class #303
- How could I send transactions continuously with Web3j generated wrapper #296
- Got Error:trouble processing "java/lang/SafeVarargs.class": under Android Studio after upgrade web3j lib from 2.2.1 to 3.1.1 #281
- Add web3j shutdown method #273
- Wrong code generation for two-dimensional arrays #271
- Add warning to Solidity when non-constant function returns a value [#257]...
v3.3.1-android
See v3.3.1 release notes.
v3.3.1
v3.3.0 Mnemonics, RLP decoding and ENS reverse name resolution
There are some great new features in this milestone release.
- Support for mnemonic style wallets, as per BIP-39 wallet support (#293), thank you @alimate
- Rlp Decoder (#302), thank you @ZhiyuHelloWorld
- ENS Reverse name resolution (#363), thank you @yuriymyronovych
- Checksum address encoding is now available
This release provides a number of minor bug fixes, including:
- Filters not working with TestRPC/Ganache (#284), thank you @NickFitton
- Enhanced error message in Abi Types (#325) - thank you @eepstein
- Error processing SafeVarArgs on Android (#281), thank you @joanesespanol
- Remote calls with a single native output return raw types instead of parameterized ones (#306) thank you @taivokasper
v3.2.0
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 #280, and the following issues, are useful for background #144, #279, #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 #239. Thanks to @eepstein for his contributions so far.
v3.1.1-android
Please refer to the v3.1.1 release notes.
v3.1.1
ENS and Truffle (v3.1.0)
ENS support
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>
Truffle support
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.
Other items
- Increment id field on requests (#232) by @IgorPerikov
- Fixed compiler warnings (#224) by @joanesespanol
- Event objects containing String and array members are now represented using byte[] values
- Module dependencies on Bintray not being pulled down (#219)
v3.0.2
El Devcon 3 especial (v3.0.1-android)
See v3.0.1 for release notes.