Hello everybody. I am new here ... so I hope its the right place. I am not a professoinal developer with coding skills. Mostly I follow tutorials, e.g. I know how to install Linux (ubuntu) or setup a server for wordpress. But thats it. No coding skills as such. Tks in advance for your patiency.
I target at creating an independent own smart contract for art NFTs, which I can trade with MetaMask wallet (Matic token / Polygon Mainnetwork) on OpenSea, NFTify and Rarible (the three leading NFT market places).
I followed the instructions on Quicknode to setup a smart contract using Truffle. The fully setup is following:
Windows 10 on Windows NT Server
Truffle v5.11.5 (core: 5.11.5)
Ganache v7.9.1
Solidity - 0.8.20 (solc-js), downgraded from 0.8.40 for import of different *.sol contracts
Node v18.18.2
Web3.js v1.10.0
npm (v10.2.1)
git (v2.42.0.windows.2)
Ascii Text editor (Notepad++ v8.5.8)
MetaMask (Browser extensoin in Google Chrome / Firefox) with Poylgon Testnet (Mumbai)
For uploading the meta data and images to mint: IPFS account and nft.storage .
The smart contract is being programmed with a Polygon endpoint, deliverd by quicknodes, and an API key for Poylgon Testnet (Mumbai) via Polygonscan. As for now I like to do first a fully test of the data workflow.
I managed it to follow the Quicknode tutorial to the point for the "truffle test" and "truffle compile", but here I get an error message, see screenshot of the terminal.
The original import code in the file ERC1555Token.sol you can find in the Quicknode link (Rec.: As new user in this forum, I am only allowed to post two links).
Its not working at all as the error message says:
ParserError: Source "@openzeppelin/contracts/token/ERC1155/ERC1155.sol" not found
--> project:/contracts/ERC1155Token.sol:6:1:
|
6 | import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,ParserError: Source "@openzeppelin/contracts/access/Ownable.sol" not found
--> project:/contracts/ERC1155Token.sol:7:1:
|
7 | import "@openzeppelin/contracts/access/Ownable.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^,ParserError: Source "@openzeppelin/contracts/utils/Strings.sol" not found
--> project:/contracts/ERC1155Token.sol:8:1:
|
8 | import "@openzeppelin/contracts/utils/Strings.sol";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Compilation failed. See above.
Truffle v5.11.5 (core: 5.11.5)
I suppose its because the OpenZeppelin structure on Github has changed
from ..... openzepelin/contracts/... to openzeppelin/openzeppelin-contracts/...
I already tried three (3) different versions of import codes, but all failed, too:
// import "github/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
// import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
// import "github/OpenZeppelin/openzeppelin/contracts/contracts/token/ERC1155/ERC1155.sol";
I would thank you for some conrete hints how to solve this problem. Tks in advance.