1

Suddenly I discovered web3j provides an option to auto-generate the Java contract from solidity contract. Sample case you can find here.

Unfortunately it does not recognize the import of openzeppelin contracts:

Error: Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File not found. Searched the following locations: "".
 --> SwapValue.sol:4:1:
  |
4 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Looks like openzeppelin provides an option to add its contracts to your projects:

npx oz link @openzeppelin/contracts-ethereum-package

, but it lives in a separate environment rather than web3j.

Is there a known option to combine the all of them into one project?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Joe Dow
  • 583
  • 1
  • 3
  • 12

0 Answers0