trufflesuite / ganache-ui

Personal blockchain for Ethereum development
https://www.trufflesuite.com/ganache
MIT License
4.66k stars 803 forks source link

Decoding Error when running Ganache 2.5.4 on win32 #2775

Open clnnn opened 3 years ago

clnnn commented 3 years ago

I have two contracts:

The relationship between those two is contract Competition is StateMachine. StateMachine is imported using import "./StateMachine.sol";.

version: pragma solidity >=0.5.0 <0.9.0; PLATFORM: win32 GANACHE VERSION: 2.5.4

EXCEPTION:

UnknownBaseContractIdError: Cannot locate base contract ID 405$ of contract$ Competition (ID 302)
    at C:\Program Files\WindowsApps\GanacheUI_2.5.4.0_x64__5dg5pnz03psnj\app\resources\static\node\node_modules\@truffle\decoder\lib\allocate\storage.ts:181:13
    at Array.map (<anonymous>)
    at allocateContract (C:\Program Files\WindowsApps\GanacheUI_2.5.4.0_x64__5dg5pnz03psnj\app\resources\static\node\node_modules\@truffle\decoder\lib\allocate\storage.ts:178:59)
    at Object.getStorageAllocations (C:\Program Files\WindowsApps\GanacheUI_2.5.4.0_x64__5dg5pnz03psnj\app\resources\static\node\node_modules\@truffle\decoder\lib\allocate\storage.ts:23:19)
    at TruffleContractDecoder.<anonymous> (C:\Program Files\WindowsApps\GanacheUI_2.5.4.0_x64__5dg5pnz03psnj\app\resources\static\node\node_modules\@truffle\decoder\lib\interface\contract-decoder.ts:237:39)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Program Files\WindowsApps\GanacheUI_2.5.4.0_x64__5dg5pnz03psnj\app\resources\static\node\node_modules\@truffle\decoder\dist\interface\contract-decoder.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
clnnn commented 3 years ago

Update: If I put all the code from StateMachine.sol into Competition.sol it works. So I guess it is a problem with imports.