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

System Error when running Ganache 2.5.4 on darwin #5060

Closed
luiztools opened this issue Nov 9, 2022 · 0 comments · Fixed by #5341
Closed

System Error when running Ganache 2.5.4 on darwin #5060

luiztools opened this issue Nov 9, 2022 · 0 comments · Fixed by #5341

Comments

@luiztools
Copy link

I opened Ganache, create a quick network, all default. Did deploy via Truffle (contract below). Called a function via truffle console (receive the tx receipt). Clicked on the new block on Ganache and when I click on the last transaction, the error occur. It happened three times in a row.

PLATFORM: darwin
GANACHE VERSION: 2.5.4

EXCEPTION:

TypeError: Cannot read property 'stack' of undefined
    at IpcMainImpl.<anonymous> (/webpack:/src/integrations/ethereum/index.js:96:31)

My contract:

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

contract BookDatabase {
struct Book {
string title;
uint16 year;
}

uint32 private nextId = 0;
mapping(uint32 => Book) public books;
uint32 public count = 0;

address private immutable owner;

constructor() {
    owner = msg.sender;
}

function addBook(Book memory newBook) public {
    nextId++;
    books[nextId] = newBook;
    count++;
}

}

My migration:

const BookDatabase = artifacts.require("BookDatabase");

module.exports = function(deployer) {
deployer.deploy(BookDatabase);
};

The commands on truffle console:

truffle console
let contract = await BookDatabase.deployed();
contract.addBook({title: "Book 1", year: 2022});

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

Successfully merging a pull request may close this issue.

1 participant