Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
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>
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.