I'm trying create a simple NFT using Java Spring Boot with Web3J dependency. When I'm trying to generate the .abi
file and .bin
file using Solc compiler, I'm receiving this error:
Source "@openzeppelin/contracts/token/ERC721/ERC721.sol" not found: File not found. Searched the following locations: "".
--> src/main/resources/solidity/nfts/SimpleCollectible.sol:7:1:
|
7 | import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The message for this error is clear, I cannot import external file. How I could fix this without copying the required files into my project?
I am new in this topic and I want to integrate smart contracts with Java.