Skip to content

Lesson 9 - Error: Calling performUpkeep(zeroBytes) results in 'function returned an unexpected amount of data' #6075

Closed Answered by r-bytes
r-bytes asked this question in Q&A
Discussion options

You must be logged in to vote

Update: I was not able to fix this issue with ethers v6.

I found out that my subscription simply wasn't created, no matter what I did.

For some reason I'm unable to successfully create a subscription using this piece of code:

await vrfCoordinatorV2Mock.createSubscription()

With ethers v5 I was able to create the subscription but got an other error:
reverted with custom error 'InvalidConsumer()'

For everybody reading this: just use ethers v5 and make sure to add your smart contract as a consumer at the bottom of your 01-deploy-raffle.ts script, right after you deploy the contract.

Like this:

const deployOptions = {
    from: deployer,
    args: args,
    log: true,
    waitConfirmations: 1,

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@r-bytes
Comment options

@Nlferu
Comment options

@r-bytes
Comment options

@Nlferu
Comment options

@r-bytes
Comment options

Comment options

You must be logged in to vote
1 reply
@Nlferu
Comment options

Answer selected by r-bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants