What is the equivalent of (in Web3Js)

token = web3.eth.contract(erc20abi).at(tokenAddress);

in Web3J

I have the erc20abi and the contract address, i want to perform transfer from one address to another.

1 Answer 1


in Web3j we use :

YourSmartContract contract = YourSmartContract.load("0x<address>", web3j, credentials, GAS_PRICE, GAS_LIMIT);

of course we don't provide Abi as argument since the YourSmartContract is a warper class for your contract in which web3j has already the ABI defined :

static final String BINARY = "606060405234610000575...…….."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.