Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

System Error after running Ganache 2.5.4 on darwin #3044

Open
wh-sadalmelik opened this issue Aug 30, 2021 · 4 comments
Open

System Error after running Ganache 2.5.4 on darwin #3044

wh-sadalmelik opened this issue Aug 30, 2021 · 4 comments

Comments

@wh-sadalmelik
Copy link

PLATFORM: darwin
GANACHE VERSION: 2.5.4

EXCEPTION:

UnknownBaseContractIdError: Cannot locate base contract ID 1444$ of contract$ PixelToken (ID 44)
    at /Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/allocate/storage.ts:181:13
    at Array.map (<anonymous>)
    at allocateContract (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/allocate/storage.ts:178:59)
    at Object.getStorageAllocations (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/allocate/storage.ts:23:19)
    at TruffleContractDecoder.<anonymous> (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/interface/contract-decoder.ts:237:39)
    at Generator.next (<anonymous>)
    at fulfilled (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/dist/interface/contract-decoder.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
@wh-sadalmelik
Copy link
Author

I created a new workspace and deployed a pure ERC271 token contract.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../node_modules/@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "../node_modules/@openzeppelin/contracts/access/Ownable.sol";
import "../node_modules/@openzeppelin/contracts/utils/Counters.sol";

contract PixelToken is ERC721, Ownable  {

    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdCounter;

    constructor() ERC721("PixelToken", "PIX") {}

    function safeMint(address to) public onlyOwner {
        _safeMint(to, _tokenIdCounter.current());
        _tokenIdCounter.increment();
    }
}

After i mint a NFT to contract owner in truffle console.

The error above occurred when i get into the transaction detail page.

And Event page return a black page with console errors:

renderer.js:2 TypeError: Cannot read property 'map' of undefined
    at EventDetailsScreen_EventDetailsScreen.render (webpack:/src/integrations/ethereum/renderer/screens/event-details/EventDetailsScreen.js:47)

@davidmurdoch davidmurdoch transferred this issue from trufflesuite/ganache Aug 30, 2021
@ceoooooo
Copy link

VERSION 2.5.4 (2.5.4.1367)
Mac OS Big Sur

When you go to the Events page
Снимок экрана 2021-09-14 в 01 23 39

Encoded event 😔 When I go to the event itself, the error is:
Снимок экрана 2021-09-14 в 01 25 58

Would you like to understand this is a problem (Ganache) parse events or a problem with my code? I would be grateful for different versions

@culnaen
Copy link

culnaen commented Sep 10, 2022

I deleted the /build directory and recompiled the contracts. After that the events in Ganache were decoded and the error disappeared

@Hsu-ken
Copy link

Hsu-ken commented Feb 18, 2023

I deleted the /build directory and recompiled the contracts. After that the events in Ganache were decoded and the error disappeared

work for me

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

No branches or pull requests

4 participants