I am using Infura and web3j to query the Ethereum blockchain. My aim is to get information about certain blocks so i'm using the function web3.eth.getBlockByNumber, however it gives me incompatible types error: int cannot be converted to DefaultBlockParameter. How can we convert an integer to default block parameter? Current code:
System.out.println("here " +web3j.ethGetBlockByNumber(6777, true));
I have also tried converting 6777 to BigInteger but it gives me incompatible types error on that too.