Closed David-Kneel closed 3 years ago
it seems one of the address you pass are undefined when using the mumbai network
By the way, the type at line https://github.com/TachyonicFinance/faster-than-light/blob/c537207168057b0999e730d002fca9a1f344ef16/deploy/04_deploy_yieldfarming.js#L15 is an ethers contract while the type at line https://github.com/TachyonicFinance/faster-than-light/blob/c537207168057b0999e730d002fca9a1f344ef16/deploy/04_deploy_yieldfarming.js#L22 is a deployment object
both have an address field so your script is fine here, but this might bite you if you assume one or the other
Also for contract already deployed (maybe by someone else) instead of hardcoding the address in the code you can add them to the deployment folder manually. then you can use deployments.get
like you did the deployment yourself
I will close the issue for now because it really looks the problem is at my end. Thank you very much for your kind meaningful help!
Description
I was automating the deployment of my hardhat project and got a problem recently with using already deployed contract at a given address. Here more specifically: https://github.com/TachyonicFinance/faster-than-light/blob/hardhat-deploy/deploy/04_deploy_yieldfarming.js#L15
Expected behavior
yarn run deploy hardhat
deploys correctly with the following output:Faulty behavior
And
yarn run deploy mumbai
fails with the following output: