CRONOS not supported ?
monoloco64856 opened this issue · comments
Hi,
I try to setup a project on CRONOS testnet (338), is it possible?
I have this error :
Uncaught (in promise) Error: You must provide the json interface of the contract when instantiating a contract object.
Thank you
Hi,
For CRONOS you should insert your contract ABI like this:
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/web3modal"></script>
<script type="text/javascript" src="https://unpkg.com/@walletconnect/web3-provider"></script>
<script>
CONTRACT_ADDRESS = "<your CRONOS contract address here>"
CONTRACT_ABI = "<your CRONOS contract ABI here>"
NETWORK_ID = 338
</script>
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
<script crossorigin src="https://unpkg.com/@mui/material@5.1.0/umd/material-ui.production.min.js"></script>
<script type="module" src="https://buildship-dev.github.io/webflow-nft-components/mint/index.js"></script>
Usually, we use our API to auto-fetch contract ABIs for the most popular networks (Ethereum, Polygon, BSC), but that isn't supported for CRONOS
Just curious: are there any NFT projects live on CRONOS network?
Thank you for your awnser. Yes there are live projects on Cronos since few weeks.
Can I use your tool with customs contracts ?
Because I always have "Minting error: TypeError: NFTContract.methods.getPrice is not a function. Please try again or contact us", so I imagine I have to custom your tool or change my contract
@pfstudio53 easiest way for you would be to add extra view function to your contract, something like:
function getPrice() public view returns (uint256) {
return _price; // or whatever it's called for you
}
Closing this, feel free to reopen if you need more help :)
We added Cronos to list of networks