Not able to generate the typegen types

When I run the command:

pnpm fuels typegen -i ./out/release/LyncIgnite-abi.json -o ./typegen

I get this:

using deprecated parameters for the initialization function; pass a single object instead
error: Cannot read properties of null (reading 'map')

My fuel-toolchain.toml

[toolchain]
channel = "nightly-x86_64-unknown-linux-gnu"

[components]
forc = "0.66.5+nightly.20241211.ff8291a2b1"
fuel-core = "0.40.0+nightly.20241211.ab053a8511"
  • fuelup show
Default host: x86_64-unknown-linux-gnu
fuelup home: /home/tit4n/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu (override)
beta-5-x86_64-unknown-linux-gnu
nightly-2024-04-12-x86_64-unknown-linux-gnu
nightly-2024-05-28-x86_64-unknown-linux-gnu
nightly-2024-10-04-x86_64-unknown-linux-gnu
testnet-x86_64-unknown-linux-gnu

active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (override), path: /home/tit4n/lync/fuel/Fuel-Contracts/LyncIgnite/fuel-toolchain.toml
  forc : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-client
      - forc-deploy : 0.66.5+nightly.20241211.ff8291a2b1
      - forc-run : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-crypto : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-debug : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-doc : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-fmt : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-lsp : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-tx : 0.66.5+nightly.20241211.ff8291a2b1
    - forc-wallet : 0.11.1+nightly.20241211.f4052012e0
  fuel-core : 0.40.0+nightly.20241211.ab053a8511
  fuel-core-keygen : not found

pnpm fuels -v
using deprecated parameters for the initialization function; pass a single object instead
0.97.1

I don’t know why but when i used bun instead of pnpm it worked for me

Hey @lokesh-lync :wave:

Could you send over the output from tree ./path/to/contract? (An example is below)

tree ./sway/blackjack-contract
./sway/blackjack-contract
├── Forc.toml
├── out
│   └── debug
│       ├── blackjack-contract-abi.json
│       ├── blackjack-contract-storage_slots.json
│       └── blackjack-contract.bin
└── src
    └── main.sw

4 directories, 5 files

Here it is:

➜ tree . -I node_modules
.
├── Forc.lock
├── Forc.toml
├── fuel-toolchain.toml
├── out
│   └── release
│       ├── LyncIgnite-abi.json
│       ├── LyncIgnite.bin
│       └── LyncIgnite-storage_slots.json
├── package.json
├── pnpm-lock.yaml
├── README.md
├── scripts
│   ├── deploy.ts
│   └── test_contract.ts
└── src
    ├── events.sw
    ├── interface.sw
    └── main.sw

5 directories, 14 files

Could you send me the contents of your /out/release/ folder or share a repository so that I can examine it more closely?

One suggestion would be to use the latest toolchain, rather than the nightly one.

it worked with latest had to delete the old out folder to see the difference.

@lokesh-lync Wonderful!

Glad you managed to resolve the issue :slight_smile:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.