I appreciate your time and do not want to contravene community standards. Newby
I also want to deploy ETH and Matic contracts at one time. My first question was on the first snippet of code below and after compiling I am not sure of how to handle " _baseURI() ". can I put parent hash there or leave blank? or something else as it may be assigned the parent hash from child deployment?
The second is chain snippet is there a prompter’s on deploy to add FxRoot and Fxchild or do I put in manually for all child designated spots?
The Third is is the Alchemy code for API and Parent/ Child. Is this in right order or does it run or ?
The fourth is royalty : does it look ok or the two snippets out of order or superseeded?
Following thread on uniswap and exclusion of non licensed. Many thanks for directions.
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/extensions/ ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol";
contract ProofContract is ERC721Enumerable, Ownable { using Strings for
string memory _name,
string memory _symbol,
string memory _initBaseURI, string memory _notRevealedURI
<<<
const { Alchemy, Network } = require("alchemy-sdk");
const settings = {
apiKey:
network: Network.MATIC_MAINNET, // Can replace with MATIC_MUMBAI
};
const alchemy = new Alchemy(settings);
async function main() {
const latestBlock = await alchemy.core.getBlockNumber();
console.log("The latest block number is", latestBlock);
}
main();
<<<
pragma solidity ^0.6.0;
import "./IERC165.sol";
interface IERC2981 is IERC165 {
function royaltyInfo(
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
);
}
interface IERC165 {function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
<<<
constructor (string memory name, string memory symbol, string memory baseURI) {
_name = name;
_symbol = symbol;
_setBaseURI(baseURI);
_registerInterface(_INTERFACE_ID_ERC721);
_registerInterface(_INTERFACE_ID_ERC721_METADATA);
_registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
_registerInterface(_INTERFACE_ID_ERC2981);
}
bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;
function checkRoyalties(address _contract) internal returns (bool) {
(bool success) = IERC165(_contract).supportsInterface(_INTERFACE_ID_ERC2981);
return success;
}
<<<