Skip to content

zk-Lokomotive/zk-lokomotive-sui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zk-lokomotive Sui

Prerequisites

Before you begin, install the following:

pnpm create sui-dapp@latest

Usage

[package] name = "greeting" edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move

[dependencies] Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/devnet" }

For remote import, use the { git = "...", subdir = "...", rev = "..." }. Revision can be a branch, a tag, and a commit hash. MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" }

For local dependencies use local = path. Path is relative to the package root Local = { local = "../path/to" }

To resolve a version conflict and force a specific version for dependency override use override = true Override = { local = "../conflicting/version", override = true }

[addresses] greeting = "0x0"

Named addresses will be accessible in Move as @name. They're also exported: for example, std = "0x1" is exported by the Standard Library. alice = "0xA11CE"

[dev-dependencies] The dev-dependencies section allows overriding dependencies for --test and --dev modes. You can introduce test-only dependencies here. Local = { local = "../path/to/dev-build" }

[dev-addresses] The dev-addresses section allows overwriting named addresses for the --test and --dev modes. alice = "0xB0B"

1. Run the local Sui network:

pnpm localnet:start

Local Sui Explorer will be available on localhost:9001

2. Deploy the demo contract to the local network:

pnpm localnet:deploy

3. Fund your localnet account via Sui Wallet or the faucet:

pnpm localnet:faucet 0xYOURADDRESS

4. Run the app:

pnpm start

Deployment (frontend)

Follow this guide to deploy the frontend app to Firebase.

Firebase

To deploy the frontend part, do the following:

  1. Install Firebase Tools
pnpm add -g firebase-tools
  1. Create a new project on Firebase

Login to Firebase Console and create a new empty project.

  1. Init your project
pnpm frontend:deploy:init
  • You will be asked to Login to Firebase.
  • Then select your newly created Firebase project from the list.
  • Once you're asked for a project alias, enter default.
  1. Deploy to Firebase
pnpm frontend:deploy

Test

pnpm test

Currently we have blockchain tests only.

Documentation

The project documentation can be found here.

Roadmap

Community

Join our Discord

Links