Giter Site home page Giter Site logo

trufflesuite / ganache-ui Goto Github PK

View Code? Open in Web Editor NEW
4.6K 111.0 782.0 299.53 MB

Personal blockchain for Ethereum development

Home Page: https://www.trufflesuite.com/ganache

License: MIT License

JavaScript 86.95% CSS 0.46% Shell 0.38% SCSS 12.21%
ethereum blockchain ganache electron development truffle

ganache-ui's Introduction

Ganache

Ganache is your personal blockchain for Ethereum development.

Getting started

You can download a self-contained prebuilt Ganache binary for your platform of choice using the "Download" button on the Ganache website, or from this repository's releases page.

Ganache is also available as a command-line tool. If you prefer working on the command-line, check out the ganache CLI.

Contributing

Please open issues and pull requests for new features, questions, and bug fixes.

Requirements:

  • node v14.21.1

To get started:

  1. Clone this repo
  2. Run npm install
  3. Run npm run dev

If using Windows, you may need windows-build-tools installed first.

Building for All Platforms

Each platform has an associated npm run configuration to help you build on each platform more easily. Because each platform has different (but similar) build processes, they require different configuration. Note that both Windows and Mac require certificates to sign the built packages; for security reasons these certs aren't uploaded to github, nor are their passwords saved in source control.

On Windows:

Building on Windows will create a .appx file for use with the Windows Store.

Before building, create the ./certs directory with the following files:

  • ./certs/cert.pfx - Note a .pfx file is identical to a .p12. (Just change the extension if you've been given a .p12.)

In order to build on Windows, you must first ensure you have the Windows 10 SDK installed. If you have errors during the build process, ensure the package.json file's windowsStoreConfig.windowsKit points to your Windows 10 SDK directory. The one specified in the package.json file currently is what worked at the time this process was figured out; it may need to be updated periodically.

Because Windows requires a certificate to build the package -- and that certificate requires a password -- you'll need to run the following command instead of npm run make:

In order to successfully sign the appx bundle on Windows 10, an alternative signtool.exe to the binary bundled with electron-builder may need to be used. See electron-userland/electron-builder#6817.

Install Windows SDK 18362 from https://developer.microsoft.com/en-us/windows/downloads/sdk-archive, and set the signtool path for electron-builder as follows:

$env:SIGNTOOL_PATH='C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\signtool.exe'

note: Newer versions of the SDK may not work, as the default value for the /fd (file digest) argument was no longer supported (electron will exclude the argument if digest is SHA1 [the default] when spawning signtool.exe, see https://github.com/electron-userland/electron-builder/blob/aeffe080e07f11057134947e09021cd9d6712935/packages/app-builder-lib/src/codeSign/windowsCodeSign.ts#L232). While older versions do not support the SIGNTOOL_PATH environment variable.

$ CERT_PASS="..." npm run build-windows

Replace ... in the command above with your certificate password.

This will create a .appx file in ./out/make.

On Mac:

Building on a Mac will create a standard Mac .dmg file.

Before building on a Mac, make sure you have Truffle's signing keys added to your keychain. Next, run the following command:

$ npm run build-mac

This will create a signed .dmg file in ./out/make.

On Linux:

Building on Linux will create a .AppImage file, meant to run on many versions of Linux.

Linux requires no signing keys, so there's no set up. Simply run the following command:

$ npm run build-linux

This will create a .AppImage file in ./out/make.

Generating Icon Assets

Asset generation generally only needs to happen once, or whenever the app's logo is updated. If you find you need to rebuild the assets, the following applications were used:

Two tools were used:

electron-icon-maker generates assets for all platforms when using Electron's squirrel package, and these assets live in ./static/icons. svg2uwptiles generates all assets needed for the Windows appx build, and those assets live in ./build/appx. These locations can be changed in the future, but make sure to change the associated configuration pointing to these assets.

Note from the author: I found managing these assets manually -- especially the appx assets -- was a pain. If possible, try not to edit the assets themselves and use one of the generators above.

Flavored Development

"Extras" aren't stored here in this repository due to file size issues, licensing issues, or both.

Non-ethereum "flavored" Ganache extras are uploaded to releases here: https://github.com/trufflesuite/ganache-flavors/releases

When "extras" change they should be uploaded to a new release, and a corresponding Ganache release that targets the new ganache-flavors release (see common/extras/index.js for what you'd need to update)

VS Code Debugging

Below is a .vscode/launch.json configuration that will attach to both the main and renderer processes. You only need to run the Launch Ganache UI configuration; the renderer attach configuration will run automatically.

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Attach to Renderer Process",
      "port": 9222,
      "request": "attach",
      "type": "pwa-chrome",
      "webRoot": "${workspaceFolder:ganache}",
      "sourceMaps": true,
      "sourceMapPathOverrides": {
        "webpack:///./*": "${webRoot}/*"
      }
    },
    {
      "name": "Launch Ganache UI",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceFolder:ganache}",
      "runtimeExecutable": "${workspaceFolder:ganache}/node_modules/.bin/electron-webpack",
      "args": ["dev"],
      "sourceMaps": true,
      "serverReadyAction": {
        "pattern": "Renderer debugger is listening on port ([0-9]+)",
        "action": "startDebugging",
        "name": "Attach to Renderer Process"
      }
    }
  ]
}

By Truffle

Ganache is part of the Truffle suite of tools. Find out more!

ganache-ui's People

Contributors

adrianmcli avatar benjamincburns avatar bmmpxf avatar cameronrll avatar davidmurdoch avatar edevil avatar githubpang avatar honestbonsai avatar jaycenhorton avatar jeffsmale90 avatar johnmcdowall avatar logical-steps avatar lookrain avatar maoueh avatar michaelbaudino avatar mikeseese avatar netergart avatar nicholasjpaterno avatar nunohora avatar omahs avatar onlyonejmjq avatar tcoulter avatar wbt avatar wuya666 avatar xitter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ganache-ui's Issues

Debian Package Install Fails on Ubuntu 16.04.3

Description

The Debian package installer progresses to about 20%, then fails. Does not close/crash Ubuntu Software Center, just resets the installer progress to 0 and returns the button from "Installing..." to "Install".

I'm not sure how Electron compiles this so it may literally only be a Debian-compatible package. Other software I've used will install via a .deb on Ubuntu though so thought I'd mention. Note: The App Image variant works!

Steps to reproduce

Open the .deb installer in Ubuntu 16.04.3.

Versions

  • OS: Ubuntu 16 LTS (16.04.3)
  • Node/NPM: 6.11.2 / 3.10.10

Linux version

When does it work for Linux? Or can I compile for Linux?

Restructure Accounts card to highlight most important information

Of the information on the accounts card, it seems less important information is highlighted over the more important items.

screen shot 2017-07-26 at 9 17 27 am

I've listed the items from most important to least important:

  1. Address
  2. Balance
  3. Nonce (should be displayed as "transaction count")
  4. Private Key
  5. Index >

Account and Balance are by far more important to a developers day to day; the last three are rarely used. Private key doesn't need to be front an center as it's definitely an advanced option. We could hide it behind a gear box, for instance, for advanced users only.

The menu title ("menu") caused me some confusion

On the left panel after starting Ganache, there are four items:

  1. Menu
  2. Dashboard
  3. Block Explorer
  4. Repl

The first, Menu, is actually a label, denoting that the next three items are part of the Menu panel. I was initially confused when I first used Ganache, thinking that "Menu" was a clickable item that would get me back to the initial screen before Ganache was started.

Couple reactions:

  • We do need some way to get back to that initial screen, and stop Ganache. I'm not sure the best way to do that.
  • If Menu is meant to be unclickable, I think we can likely remove it. The theme on the left panel is good enough to show the user that those are the available options, without needing a label.

Confusing Menu button[minor][ui]

Minor UI style issue

screen shot 2017-06-01 at 8 07 45 pm

Since Menu is not a button, I believe it should have a different style. Otherwise, my first impression was that it's a button, not a label

CPU usage

Any tips on what triggers high CPU usage?

Block Card Number goes crazy

Something happens after a while... the block card block number goes wildly out of sync with the actual current block height shown on the sidebar.

CPU Usage climbs higher over time

If left running and mining blocks at 1sec intervals, by the time block 500 comes around CPU usage tends to be hitting 109%. Benchmarking the ganache-core library doesn't show anywhere near the same level of grind.

This could be a problem with Electron itself:

nylas/nylas-mail#2068
nylas/nylas-mail#3178
electron/electron#7181

Possible contenders for source of issue could be:

  • Needing to break the mining out into its own process
  • Animations in the UI
  • React updates / inefficiencies

Steps to reproduce

So far I've only noticed this on macOS

Console is allowing problematic edge case input

I got a console error edge case. Go to the console, type:

  1. web3.eth. (yes, with the ending .)
  2. Hit enter a few times if you want, all is cool - it does what it expects.
  3. Now type anything else other than enter. Right as you start typing, you see this:

screen shot 2017-07-20 at 3 01 21 pm

Investigate Leveldown warnings during build

WARNING in ./~/ethereumjs-vm/lib/runJit.js
Critical dependencies:
13:16-23 require function is used in a way in which dependencies cannot be statically extracted
 @ ./~/ethereumjs-vm/lib/runJit.js 13:16-23

WARNING in ./~/levelup/lib/util.js
Module not found: Error: Cannot resolve module 'leveldown/package.json' in /Users/jmd/code/clients/consensys/zircon/node_modules/levelup/lib
 @ ./~/levelup/lib/util.js 36:23-56

WARNING in ./~/levelup/lib/util.js
Module not found: Error: Cannot resolve module 'leveldown' in /Users/jmd/code/clients/consensys/zircon/node_modules/levelup/lib
 @ ./~/levelup/lib/util.js 52:23-43

WARNING in ./~/level-sublevel/~/levelup/lib/util.js
Module not found: Error: Cannot resolve module 'leveldown/package' in /Users/jmd/code/clients/consensys/zircon/node_modules/level-sublevel/node_modules/levelup/lib
 @ ./~/level-sublevel/~/levelup/lib/util.js 53:23-51

WARNING in ./~/level-sublevel/~/levelup/lib/util.js
Module not found: Error: Cannot resolve module 'leveldown' in /Users/jmd/code/clients/consensys/zircon/node_modules/level-sublevel/node_modules/levelup/lib
 @ ./~/level-sublevel/~/levelup/lib/util.js 69:23-43

Missing bignumber.js

Hi,

I can't compile the codes as the big number.js is missing from debris repository.
I've changed yarn.lock and app/yarn.lock for bignumber.js from

https://github.com/MikeMcl/bignumber.js/commit/b12705646d76f8867861affe0646faaadbd3a55e

and it solved the problem. I have it in my forked repo, and I can make a pull request if needed.

Thanks.

Enable Insta-mining by default

The UI should present insta-mining as enabled by default, with a toggle to specify a block mining time and auto mining.

Close, Minimize and Maximize Buttons Unresponsive in Ubuntu 16.04.3

Description

Clicking the close, minimize or maximize buttons behaves as if I'm just dragging the title bar in an off-button location.

If I double click the title bar to maximize the window, the system close/min/max buttons that appear in the toolbar do function as normal.

Steps to reproduce

Install Ganache via the App Image, open and click one of the aforementioned buttons.

Versions

  • OS: Ubuntu 16 LTS (16.04.3)
  • Node/NPM: 6.11.2 / 3.10.10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.