casper-deployer-hackathon-oct-2022

Casper Deployer - Information and How-To Guides


Welcome to Project Casper Deployer!

CasperLabs Hackaton October 2022 πŸ‘» πŸŽƒπŸ•―οΈ

Project built with 😘β™₯πŸ’•β€ for Casper Blockchain codecov

🏰 Deployed on Render at https://casper.onrender.com/ ( beta πŸšοΈπŸ•ΈοΈπŸ•·οΈ)


πŸ“” Project

This projects aims to ease interactions with Casper Casper Blockchain during smart contracts development and for regular queries done with the Casper Client CLI

This project relies on casper-js-sdk and casper-rust-sdk to help with onboarding developers on the Casper Network and also users by providing better insights on Casper Blockchain concepts (URef, Dictionnaries etc..) and with giving the ability to deploy a smart contract signed with the Capser Signer.


image



✍️ Casper Signer

Using Chrome or a Chromium-based browser like Brave ? visit the Chrome Web Store, then download and install CasperLabs Signer extension

πŸ“œ CasperLabs Signer acts as your CSPR wallet, keeping your accounts and letting you sign deploys on the Casper Network to perform actions like staking, unstaking or sending your tokens to another person or an exchange account.

For Casper Signer Users

#

🏭 Tech Stack

#

πŸ—οΈ Architecture

Web Server

Web server is implemented in Express.js.

Api Server

Api server is implemented in NestJS+ Nx structure.

Client

UI is implemented in Angular.js + Nx structure.

Smart contracts

Smart contracts are implemented in Rust + Casper Smart contract Crate.

Folders at root directory is as follow :

#

πŸ™ Features

#

πŸ›£οΈ Roadmap / Todo / Tofix

#

πŸ§™β€β™€οΈ Development

Prerequisites

This web project was generated and is using

#

🐳 Docker

Donwload and run image with docker-compose.yml πŸƒ

docker-compose -f './docker/docker-compose.yml' up -d

OR

Pull and run image from https://hub.docker.com/r/gregoshop/casper-deployer πŸƒβ€β™€οΈ

docker pull gregoshop/casper-deployer
docker container run -t -i --rm -h casper-deployer -p 4200:4200 gregoshop/casper-deployer

OR

Build and run image with Dockerfile πŸƒβ€β™‚οΈ

docker build -t casper-deployer ./docker/ --force-rm

docker container run -t -i --rm -h casper-deployer -p 4200:4200 casper-deployer

#

πŸ› οΈ Usage with npm

Install

πŸ“‚ Go to www folder

cd ./www

Run npm install to install the application.

npm install

Development server

Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

npm start

Development server as production

Run npm run start:prod for a dev server with production configuration. Navigate to http://localhost:4200/.

npm run start:prod

Build

Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.

npm run build

Running unit tests

Run npm run test to execute the unit tests via Jest.

npm run test

Run nx affected:test to execute the unit tests affected by a change.

Running end-to-end tests

Run npm run e2e to execute the end-to-end tests via Cypress.

npm run e2e

Run nx affected:e2e to execute the end-to-end tests affected by a change.

🎠 Configuration

Settings can be changed in /www/libs/util/config/src/config.ts

Default example settings are

{
  "api_prefix": "/api/",
  "gasFee": "150000000",
  "minimumTransfer": "25000000000",
  "TTL": "30m",
  "idMax": "100000000",
  "gasFeeTransfer": "10000"
}

πŸ“Š Understanding the workspace

Run nx graph to see a diagram of the dependencies of the projects.

πŸ•β€πŸ¦Ί Further help

Visit the Nx Documentation to learn more.

#

🚧 Workflow and contributions

⚠️ Work in Progress

https://github.com/gRoussac/casper-deployer-hackathon-oct-2022/blob/Development-Workflow

πŸ“ License

GNU GENERAL PUBLIC LICENSE

🦺 Security

https://github.com/gRoussac/casper-deployer-hackathon-oct-2022/blob/master/SECURITY.md

❓Have questions?

Go to the #hackathon channel on Discord

πŸͺ¦ Errors ?

If you see any typos or errors you can edit the code directly on GitHub and raise a Pull Request on dev branch, many thanks !