Coder Social home page Coder Social logo

luixo / near-kurtosis-module Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kurtosis-tech/zzz-deprecated-near-kurtosis-module

0.0 1.0 0.0 309 KB

A Kurtosis module for launching a local NEAR network in Kurtosis

Home Page: https://docs.kurtosistech.com/modules.html

Shell 17.79% TypeScript 80.32% Dockerfile 1.89%

near-kurtosis-module's Introduction

NEAR Kurtosis Module

This repository contains a Kurtosis module for setting up a NEAR network locally on your machine using Kurtosis. It is published to Dockerhub here.

The validator key of the node that it starts is:

{
  "account_id": "test.near",
  "public_key": "ed25519:3Kuyi2DUXdoHgoaNEvCxa1m6G8xqc6Xs7WGajaqLhNmW",
  "secret_key": "ed25519:2ykcMLiM7vCmsSECcgfmUzihBtNdBv7v2CxNi94sNt4R8ar4xsrMMYvtsSNGQDfSRhNWXEnZvgx2wzS9ViBiS9jW"
}

The URLs of the services started inside Kurtosis are as follows:

  • Near node RPC URL: http://127.0.0.1:8332,
  • Contract helper service URL: http://127.0.0.1:8330,
  • Explorer URL: http://127.0.0.1:8331
  • Wallet URL: http://127.0.0.1:8334,

Quickstart

Follow the instructions on the NEAR docs.

For Kurtosis Devs: Upgrading Dependencies

Rebuild the indexer-for-explorer NEAR node

  1. Clone the NEAR indexer-for-explorer repository
  2. Pull the latest master branch
  3. In the root of the repo, build a Docker image (will take ~45 minutes!):
    docker build -f Dockerfile -t "kurtosistech/near-indexer-for-explorer:$(git rev-parse --short HEAD)" .
    
  4. Slot the produced image-and-tag into the IMAGE constant in the indexer.ts file

Rebuild the contract helper service

  1. Clone the NEAR contract-helper-service repository
  2. Pull the latest master branch
  3. In the root of the repo, build a Docker image:
    docker build -f Dockerfile.app -t "kurtosistech/near-contract-helper:$(git rev-parse --short HEAD)" .
    
  4. Slot the produced image-and-tag into the IMAGE constant in the contract_helper.ts file

Rebuild the explorer backend & frontend

  1. Clone the NEAR explorer repository
  2. Pull the latest master branch
  3. In the root of the repo, build an explorer backend Docker image:
    docker build -f backend/Dockerfile -t "kurtosistech/near-explorer_backend:$(git rev-parse --short HEAD)" .
    
  4. Slot the produced image-and-tag into the IMAGE constant in the explorer_backend.ts file
  5. In the root of the repo, build an explorer backend Docker image:
    docker build -f frontend/Dockerfile -t "kurtosistech/near-explorer_frontend:$(git rev-parse --short HEAD)" .
    
  6. Slot the produced image-and-tag into the IMAGE constant in the explorer_frontend.ts file

Rebuild the wallet

  1. Clone the NEAR wallet
  2. Pull the latest master branch
  3. In the root of the repo, build a Docker image:
    docker build -f Dockerfile -t "kurtosistech/near-wallet:$(git rev-parse --short HEAD)" .
    
  4. Slot the produced image-and-tag into the IMAGE constant in the wallet.ts file

Test the module

  1. Rebuild & rerun the module (replacing THE_BUILT_TAG with the tag of the module that gets built locally):
kurtosis clean -a && ./scripts/build.sh && kurtosis module exec kurtosistech/near-kurtosis-module:THE_BUILT_TAG
  1. Debug & fix any errors, opening issues on the various NEAR repositories as necessary (this is the fastest way to interact with the NEAR devs)
    • NOTE: the NEAR wallet doesn't have a productized way to be configured at runtime (only at buildtime!) because it uses Parcel to precompile & minify all the Javascript into a single file; this means that to point the Wallet at the local services inside of Kurtosis we do janky sed'ing to replace variable values inside the minified Wallet Javascript file
  2. Repeat the dev loop as necessary

Release the module

  1. Push the images that your module version is now using (easy way to find them: go through the IMAGE constants in each file)
  2. Cut a PR
  3. Once it's approved, merge & release

near-kurtosis-module's People

Contributors

mieubrisse avatar leoporoli avatar galenmarchetti avatar

Watchers

 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.