Code Monkey home page Code Monkey logo

bodhi.js's Introduction

@acala-network/bodhi.js

Some tools and SDKs related to Acala EVM.

Packages:

Getting Started

  • install all dependencies
rush update
  • build
rush build // build all
rush build -t @acala-network/eth-rpc-adapter //  build all the things that @acala-network/eth-rpc-adapter depends on, and also @acala-network/eth-rpc-adapter itself
  • run build when the file changes
rush build:watch // watch all packages
rush build:watch -t @acala-network/eth-rpc-adapter //  watch all the things that @acala-network/eth-rpc-adapter depends on, and also @acala-network/eth-rpc-adapter itself
  • run a script defined in project's package.json
cd <project>
rushx <script-name>
  • add pacakge
rush add -p <package> --all             # for all projects
cd <project> && rush add -p <package>   # for this project only

use with docker

build and run eth-rpc-adaptor

docker build -f eth-rpc-adapter/Dockerfile . -t eth-rpc-adapter
docker run -it -p 8545:8545 [--env-file=eth-rpc-adapter/.env] eth-rpc-adapter yarn dev

run tests with docker

  • clean up
# super-quickly clean up docker containers and volumes (make sure you know what you are doing)
docker compose down ; docker rm -f $(docker ps -a -q) ; docker volume rm $(docker volume ls -q)

# or more safe way to clean up only related services
docker rm -vf $(docker ps -a | grep bodhijs_subquery-node | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_graphql-engine | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_postgres | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_mandala-node | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_eth-rpc-adapter-server | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_loop | awk '{print $1}')
docker rm -vf $(docker ps -a | grep bodhijs_feed-tx | awk '{print $1}')
  • run tests
# run any test, where xxx โˆˆ { waffle-examples-test, eth-providers-test, eth-rpc-adapter-test, hardhat-examples-test, truffle-examples-test }
docker-compose up --abort-on-container-exit --exit-code-from=xxx --build -- xxx

# run all tests (not recommended since log will be too messy)
docker-compose up

Documentation

  • This project is managed by Rushstack.
  • Most of the api of bodhi.js is compatible with ethers.js.

Release Workflow

manual

## first let rush determine what projects were changed
rush change --bulk --message "version x.x.x" --bump-type "patch"

## build
rush build

## publish
rush publish -p --set-access-level public -n <paste_npm_token_here>

CI

In order to trigger a auto release, we need to tag the commit with 'v*', any other commit won't trigger the auto publish. Also, remember to update the version fields in package.json, otherwise publishing will fail.

For example

git commit -m "bump version to v2.0.8-beta"
git tag v2.0.8-beta

# push code, this won't trigger CI
# if this creates a pull request, make sure to merge it before push tag
git push

# push the tag, this will trigger CI auto release
# do this after the code is actually merged
git push origin v2.0.8-beta

bodhi.js's People

Contributors

ntduan avatar actions-user avatar shunjizhan avatar zjb0807 avatar xlc avatar ermalkaleci avatar gluneau avatar brettkolodny avatar

Watchers

James Cloos avatar

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.