darkforest-eth/eth

Compile error

itewqq opened this issue · 4 comments

eth> node --version
v16.13.0
eth> tsc -v        
Version 4.5.2
eth> yarn --version
1.22.17

> yarn
yarn install v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ yarn run compile
yarn run v1.22.17
$ hardhat compile
An unexpected error occurred:

tasks/deploy-more.ts:119:5 - error TS2740: Type 'Contract' is missing the following properties from type 'DarkForestUtils': _calculateByteUInt, _getBiome, _getPlanetLevelTypeAndSpaceType, _getRadius, and 11 more.

119     utils: utils,
        ~~~~~

  task-types.ts:27:3
    27   utils: DarkForestUtils;
         ~~~~~
    The expected type comes from property 'utils' which is declared here on type 'LibraryContracts'
tasks/deploy-more.ts:120:5 - error TS2740: Type 'Contract' is missing the following properties from type 'DarkForestPlanet': _getDecayedPop, checkPlayerInit, getRefreshedPlanet, isDefBoost, and 4 more.

120     planet: planet,
        ~~~~~~

  task-types.ts:28:3
    28   planet: DarkForestPlanet;
         ~~~~~~
    The expected type comes from property 'planet' which is declared here on type 'LibraryContracts'
tasks/deploy-more.ts:122:5 - error TS2739: Type 'Contract' is missing the following properties from type 'Verifier': verifyBiomebaseProof, verifyInitProof, verifyMoveProof, verifyRevealProof

122     verifier: verifier,
        ~~~~~~~~

  task-types.ts:30:3
    30   verifier: Verifier;
         ~~~~~~~~
    The expected type comes from property 'verifier' which is declared here on type 'LibraryContracts'
tasks/deploy-more.ts:123:5 - error TS2741: Property 'checkFindArtifact' is missing in type 'Contract' but required in type 'DarkForestArtifactUtils'.

123     artifactUtils: artifactUtils,
        ~~~~~~~~~~~~~

  node_modules/@darkforest_eth/contracts/typechain/DarkForestArtifactUtils.d.ts:178:3
    178   checkFindArtifact(
          ~~~~~~~~~~~~~~~~~
    'checkFindArtifact' is declared here.
  task-types.ts:31:3
    31   artifactUtils: DarkForestArtifactUtils;
         ~~~~~~~~~~~~~
    The expected type comes from property 'artifactUtils' which is declared here on type 'LibraryContracts'

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Is this from a fresh clone or did you pull new commits and try to rebuild over some old stuff?

It's a fresh clone, and the version:

$ git log -1
commit 63a11f2176b0205eb13965634c7e257bfedef2b1 (HEAD -> master, origin/master, origin/HEAD)
Author: GitHub Action <action@github.com>
Date:   Tue Nov 23 16:23:59 2021 +0000

    update contracts

I have the same problem

Going to close this since the project is now using diamond and newer hardhat.