-
|
I was following the tutorial and tried to run my own test, but when I want to test my contract, it keeps throwing this error: ---------------------------Here is my code snippet-------------------------- |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 24 replies
-
|
Hi @Tosinkoa can you please share your FundMe.sol code as well. It may happen that naming is different. |
Beta Was this translation helpful? Give feedback.
-
|
I found a mistake in your deploy-fund-me.js You are not setting the value for args in the following code I think it should be |
Beta Was this translation helpful? Give feedback.
-
|
I think the error is because you have declared fundMe but exporting fundme. const fundMe = await deploy("PaulFundMe", module.exports.tags = ["all", "fundme"]; Try changing to See if this fixes the error. |
Beta Was this translation helpful? Give feedback.
-
|
Are you deploying to On local networks, no waiting needs to be done,.. so change code to: |
Beta Was this translation helpful? Give feedback.
-
|
Is something wrong with my test? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
@Tosinkoa did you find the solution to your problem? |
Beta Was this translation helpful? Give feedback.
-
|
I did |
Beta Was this translation helpful? Give feedback.
I did
module.exports.defaults = async ({ getNamedAccounts, deployments }) => {instead ofmodule.exports = async ({ getNamedAccounts, deployments }) => {in my deployment file.