kurtosis-tech / awesome-kurtosis

Official Awesome Kurtosis page. Code examples using Kurtosis
MIT License
40 stars 11 forks source link

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

Open sbellem opened 7 months ago

sbellem commented 7 months ago

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 commented 7 months ago

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

sbellem commented 7 months ago

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

commit 352ddfe16ca5a8cef5e0567e5d76ce40627811bb (HEAD -> main, origin/main, origin/HEAD)
Author: Gyanendra Mishra <anomaly.the@gmail.com>
Date:   Mon Apr 8 14:56:51 2024 +0100

    fix: smart contract test (#330)
lostbean commented 7 months ago

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

h4ck3rk3y commented 7 months ago

@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 commented 7 months ago

@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 commented 6 months ago

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

jcbrand commented 1 month ago

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