Developer Wanted and Review Wanted

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;
 }



<<<
  1. When you put in a base URI your token URIs will consist of that base URI concatenated with the token id number. So if your base URI is ipfs://abcdef/, the URI for token with id 4 will be ipfs://abcdef/4. You can also leave it blank, in that case you may want to use ERC721URIStorage to be able to set a different URI per token ID.

  2. Not sure what you're asking about here, please share the code.

  3. You will want to ask for help in one of Alchemy's support channels. Please note you've shared your API key, you shouldn't do this.

  4. The code snippet looks broken. You should import and use our ERC721Royalty contract.

Thank you so much!
#1 deleted api immediately in post
#2 added royalty import at top with all imports
#3 signed up for alchemy discord
#4 ERC721URIStorage : can you direct me to docs on how to insert and use?
#5 I think the problem is the code is not what another post suggest so I will post that first and then the cross chaoin that I found and earlier posted but is probably out of date.

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 
import "@maticnetwork/fx-portal/contracts/tunnel/FxBaseChildTunnel.sol"; import "@maticnetwork/fx-portal/contracts/tunnel/FxBaseRootTunnel.sol"; import "./core/BridgeBase.sol"; 
contract BrigdePolygonChild is BrigdeBase, FxBaseChildTunnel { constructor(address _fxChild) FxBaseChildTunnel(_fxChild) {} 
function sendMessage(address target, bytes calldata data, uint32) external { _sendMessageToRoot(_encodeMessage(msg.sender, target, data)); 
} 
function _processMessageFromRoot(uint256 /*stateId*/, address emitter, bytes memory message) internal override validateSender(emitter) { 
(address sender, address target, bytes memory data) = _decodeMessage(message); 
_forward(sender, target, data); } 
} 
contract BrigdePolygonRoot is BrigdeBase, FxBaseRootTunnel { constructor(address _checkpointManager, address _fxRoot) FxBaseRootTunnel(_checkpointManager, _fxRoot) {} 
function sendMessage(address target, bytes calldata data, uint32) external { _sendMessageToChild(_encodeMessage(msg.sender, target, data)); 
} 
function _processMessageFromChild(bytes memory message) internal override { (address sender, address target, bytes memory data) = _decodeMessage(message); _forward(sender, target, data); 
} } 

this one is out of date or just gobbledygook?

// SPDX-License-Identifier: MIT

// OpenZeppelin Contracts (last updated v4.7.0) (crosschain/polygon/CrossChainEnabledPolygonChild.sol)

pragma solidity ^0.8.4;

import "../CrossChainEnabled.sol";

import "../../security/ReentrancyGuard.sol";

import "../../utils/Address.sol";

import "../../vendor/polygon/IFxMessageProcessor.sol";

address constant DEFAULT_SENDER = 0x000000000000000000000000000000000000dEaD;

abstract contract CrossChainEnabledPolygonChild is IFxMessageProcessor, CrossChainEnabled, ReentrancyGuard {
address private immutable _fxChild;
address private _sender = DEFAULT_SENDER;

constructor(address fxChild) {_fxChild = fxChild;

}
 function _isCrossChain() internal view virtual override returns (bool) {

       return msg.sender == _fxChild;

    }
function processMessageFromRoot(

        uint256 /* stateId */,

        address rootMessageSender,

        bytes calldata data

    ) external override nonReentrant {

        if (!_isCrossChain()) revert NotCrossChainCall();

        _sender = rootMessageSender;

        Address.functionDelegateCall(address(this), data, "cross-chain execution failed");

        _sender = DEFAULT_SENDER;

    }

}


That's all but your help is making me confident in this endeavor of coding and I am grateful.
monk

For ERC721URIStorage please check out Contracts Wizard, select the "URI Storage" and "Mintable" options for an example.


The Polygon question is still not very clear but I think you should read their documentation carefully and it will probably help:


To format code you have to use triple backticks surrounding it.

```
code here
```