I made a project relating to a youtube video and got this issue
When I try to deploy contract ob rinkeby it gives me this error "Error: transaction failed [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ]". I have checked everything many times and it still doesn't work
Part of Javascript file, where is the issue (it stops after "testing 1"
const RandomSVGContract = await ethers.getContractFactory('RandomSVG')
const randomSVG = new ethers.Contract(RandomSVG.address, RandomSVGContract.interface, signer)
let creation_tx = await randomSVG.create({ gasLimit: 7000000, gasPrice: 20000000000, value: '1000000000000000000' })
log(`testing 1`)
let receipt = await creation_tx.wait(1)
log(`testing 2`)
let tokenId = receipt.events[3].topics[2]
log(`testing 3`)
log(`You have made your NFT! This is token number ${tokenId.toString()}`)
log(`Lets wait for the ChainLink node to respond...`)
Solidity function that I try to call
function create() public payable returns (bytes32 requestId) {
require(msg.value >= price, "need to send more eth");
requestId = requestRandomness(keyHash, fee);
requestIdToSender[requestId] = msg.sender;
uint256 tokenId = tokenCounter;
requestIdToTokenId[requestId] = tokenId;
tokenCounter = tokenCounter + 1;
emit requestedRandomSVG(requestId, tokenId);
}
It's interesting, but it is easily deploying on localnet, but doesn't deploy ob rinkeby