Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[smart contract example] TypeError: this.chips.deployed is not a function #338

Open
sbellem opened this issue Apr 11, 2024 · 7 comments
Open
Assignees

Comments

@sbellem
Copy link

sbellem commented Apr 11, 2024

Following https://docs.kurtosis.com/how-to-local-eth-testnet#deploy-and-test-your-dapp-locally, and got this error:

$  npx hardhat test --network localnet


  ChipToken
    mint
      1) "before each" hook for "should mint 1000 chips for PLAYER ONE"


  0 passing (65ms)
  1 failing

  1) ChipToken
       "before each" hook for "should mint 1000 chips for PLAYER ONE":
     TypeError: this.chips.deployed is not a function
@lostbean
Copy link
Contributor

Hi @sbellem, that was supposed to be fixed after #330. Are you running it out of the latest commit on kurtosis-tech/awesome-kurtosis?

@lostbean lostbean self-assigned this Apr 11, 2024
@sbellem
Copy link
Author

sbellem commented Apr 12, 2024

@lostbean yes, just cloned the repo today, and the HEAD points to 352ddfe

commit 352ddfe16ca5a8cef5e0567e5d76ce40627811bb (HEAD -> main, origin/main, origin/HEAD)
Author: Gyanendra Mishra <[email protected]>
Date:   Mon Apr 8 14:56:51 2024 +0100

    fix: smart contract test (#330)

@lostbean
Copy link
Contributor

@h4ck3rk3y do you have context why this still failing on HEAD?

@h4ck3rk3y
Copy link
Contributor

@sbellem the deploy.ts bit is what our CI everynight runs so this is surprising, can you check if you have cleared your build / node_modules folders?

@sbellem
Copy link
Author

sbellem commented Apr 19, 2024

@h4ck3rk3y Tried removing all untracked files (node_modules, etc) and still get the issue.

Created a Dockerfile to reproduce the problem. Follow https://github.com/sbellem/awesome-kurtosis/tree/dev/smart-contract-example#running-the-example.

@tuky191
Copy link

tuky191 commented May 16, 2024

Hi, I found the issue with deployed() being replaced with waitForDeployment() opened PR

@jcbrand
Copy link

jcbrand commented Oct 4, 2024

FWIW I got the same error just now and @tuky191's fix worked for me a well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants