Giter Site home page Giter Site logo

alpaca's Introduction

Alpaca

About

Alpaca is your trusty blockchain tour guide, guiding you through Starknet network. Inspired by Ganache UI, Alpaca spins up a local Devnet instance, which is invaluable for testing smart contracts in a development environment.

Goal

Alpaca's goal is to provide the same user-friendly interface and feature set similar to Ganache UI, such as managing accounts, inspecting transactions, and simulating various network conditions, but also can expand on that with features like as L2←→L1 simulations.

Powered by

React, CSS, MobX, Electron & Rust alpaca-addon

Supported platforms

Since alpaca-addon is basically a DLL it requires to be compiled for every platform individually.

Check the table to see if your platform is supported:

MacOS Linux Windows
x86_64 ✔️ ✔️ ✔️
arm64 ✔️ ✔️

Setup

If your hardware & OS requirements are met run:

yarn build

and then

yarn start

If your project uses Devnet, you shall be able to seamlessly use this one. Example project.

P.S. Proper error messages are yet to come, so make sure your port isn't occupied when launching.

alpaca-addon

alpaca-addon is what really makes this possible. It is an npm package and can be used in any other project. Under the hood it spins up starknet-devnet-rs.

The code may be found here.

P.S.

That was a pet project at the beginning in which I poured my soul, but I hope it can evolve in something more.

I'm not a front-end dev so don't judge me real hard here :). And to be honest I realised that "Reacting" & "CSSing" isn't my thing really, but I know there are much better and more passionate people about this in community. All suggestions and contributions are always welcome.

Want to express my gratitude for Starknet Foundation. STRK allocation was really a life-changing moment for me and also a trigger to finally publish this.

UI is very raw and has only fraction of Ganache-UI functionality.

alpaca's People

Contributors

fabijanc avatar taco-paco avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fabijanc

alpaca's Issues

Permission denied on add-on launch

          Ok, I am able to see the GUI, but when I click start, I get
yarn run v1.22.21
warning package.json: No license field
$ electron dist/main.js
/home/fabijanc/shardlabs/alpaca/dist
[main]:  create-engine-process
[main]:  second start
[main]:  engine-created [ null ]
cat: standard output: Bad file descriptor
[main]:  startDevnet { seed: 20, port: 5050, totalAccounts: 10 }
onEvent: error, Error: internal error in Neon module: called `Result::unwrap()` on an `Err` value: IoError(Os { code: 13, kind: PermissionDenied, message: "Permission denied" })
    at eval (webpack://basic/./node_modules/@taco-paco/alpaca-addon-linux-x64/src/promise.js?:6:9)
    at new Promise (<anonymous>)
    at Object.createPromise (webpack://basic/./node_modules/@taco-paco/alpaca-addon-linux-x64/src/promise.js?:5:12)
    at Devnet.start (webpack://basic/./node_modules/@taco-paco/alpaca-addon-linux-x64/index.js?:20:26)
    at eval (webpack://basic/./app/engine/index.ts?:70:77)
    at step (webpack://basic/./app/engine/index.ts?:36:23)
    at Object.eval [as next] (webpack://basic/./app/engine/index.ts?:17:53)
    at eval (webpack://basic/./app/engine/index.ts?:11:71)
    at new Promise (<anonymous>)
    at __awaiter (webpack://basic/./app/engine/index.ts?:7:12)

Do you want me to post this in a new issue? Should I have devnet globally installed?

Originally posted by @FabijanC in #2 (comment)

Failed resolutions on yarn build

I pulled the latest commit, installed dependencies with yarn and ran yarn build. This is what I got:

yarn run v1.22.21
warning package.json: No license field
$ yarn copyAddon && yarn build:renderer && yarn build:engine && yarn build:main
warning package.json: No license field
$ ts-node package-scripts/copyAddon.ts
warning package.json: No license field
$ webpack --config webpack.config.renderer.dev.js
asset renderer.js 1.67 MiB [emitted] (name: renderer)
asset main.html 355 bytes [emitted]
runtime modules 2.18 KiB 7 modules
modules by path ./node_modules/ 1.57 MiB
  modules by path ./node_modules/style-loader/dist/runtime/*.js 5.84 KiB 6 modules
  modules by path ./node_modules/react-dom/ 1000 KiB 3 modules
  modules by path ./node_modules/react/ 85.7 KiB 2 modules
  modules by path ./node_modules/css-loader/dist/runtime/*.js 2.31 KiB 2 modules
  modules by path ./node_modules/scheduler/ 17.3 KiB 2 modules
  + 6 modules
modules by path ./app/front/ 4.93 KiB
  modules by path ./app/front/*.ts 1.88 KiB 2 modules
  modules by path ./app/front/*.css 1.74 KiB
    ./app/front/index.css 1.22 KiB [built] [code generated]
    ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./app/front/index.css 527 bytes [built] [code generated]
  ./app/front/index.tsx 1.31 KiB [built] [code generated]

ERROR in ./app/front/index.tsx 6:0-40
Module not found: Error: Can't resolve './screens/Setup' in '/home/fabijanc/shardlabs/alpaca/app/front'

ERROR in ./app/front/index.tsx 8:0-38
Module not found: Error: Can't resolve './screens/Loader' in '/home/fabijanc/shardlabs/alpaca/app/front'

ERROR in ./app/front/index.tsx 10:0-46
Module not found: Error: Can't resolve './screens/Explorer' in '/home/fabijanc/shardlabs/alpaca/app/front'

ERROR in ./app/front/rootStore.ts 2:0-47
Module not found: Error: Can't resolve './screens/Setup/store' in '/home/fabijanc/shardlabs/alpaca/app/front'
 @ ./app/front/index.tsx 3:0-49 18:28-44 18:55-64

ERROR in ./app/front/rootStore.ts 4:0-61
Module not found: Error: Can't resolve './screens/Transactions/store' in '/home/fabijanc/shardlabs/alpaca/app/front'
 @ ./app/front/index.tsx 3:0-49 18:28-44 18:55-64

ERROR in ./app/front/rootStore.ts 5:0-53
Module not found: Error: Can't resolve './screens/Accounts/store' in '/home/fabijanc/shardlabs/alpaca/app/front'
 @ ./app/front/index.tsx 3:0-49 18:28-44 18:55-64

ERROR in ./app/front/rootStore.ts 6:0-57
Module not found: Error: Can't resolve './screens/Explorer/distributor' in '/home/fabijanc/shardlabs/alpaca/app/front'
 @ ./app/front/index.tsx 3:0-49 18:28-44 18:55-64

ERROR in ./app/front/rootStore.ts 7:0-49
Module not found: Error: Can't resolve './screens/Blocks/store' in '/home/fabijanc/shardlabs/alpaca/app/front'
 @ ./app/front/index.tsx 3:0-49 18:28-44 18:55-64

8 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.90.3 compiled with 8 errors in 1295 ms
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

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.