Skip to main content

About

Sorodev is a CLI tool and Python package which allows to develop with Soroban more efficiently.

It is designed for Linux systems (Debian, WSL, ...)

Why?

While soroban-cli is like a Swiss knife to interact with Soroban, it also requires many arguments and parameters to specify the context, such as the current network being used, the last deployment addresses, ...

Similarly, Rust is a generic and customizable language, which requires to replicate the same patterns for each contract.

The idea behind sorodev is to provide the setup to get started with a development on Soroban and to bring some tools on top of soroban-cli.

For example:

  • create new Soroban projects and contracts (create default Cargo.toml, lib.rs, test.rs)
  • use a sorodev.json to configure the current parameters
  • build, test, deploy, invoke contracts, or make contract bindings with simple commands

To sum up, Sorodev indends to make it easier for anyone to start developping on Soroban and to enable a more efficient development experience.

However, it's recommended to understand both the Soroban development setup and how Sorodev works.

Getting started

Installation

Install Soroban

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install the WebAssembly compilation target

rustup target add wasm32-unknown-unknown

Install soroban-cli

cargo install soroban-cli

Install Sorodev

pip install sorodev

Standalone project

mkdir example
cd example

sorodev install
sorodev add-contract hello_soroban
sorodev add-account alice
sorodev build
sorodev test
sorodev deploy hello_soroban
sorodev invoke hello_soroban hello --args "--to Sorodev"

Create an Astro project

npm create astro@4.0.1 example_astro --\
	--template basics\
	--install\
	--no-git\
	--typescript strictest

cd example_astro

sorodev install
sorodev add-contract hello_soroban
sorodev add-account alice
sorodev build
sorodev deploy hello_soroban
sorodev make-binding hello_soroban

In pages/index.astro, add the following lines:

---
import Layout from "../layouts/Layout.astro";
import Card from "../components/Card.astro";

+ import { Contract, networks } from "hello_soroban-client";

+ const greeter = new Contract({
+   ...networks.testnet,
+   rpcUrl: "https://soroban-testnet.stellar.org",
+ });
+ 
+ const { result } = await greeter.hello({ to: "Sorodev" });
---
- <h1>Welcome to <span class="text-gradient">Astro</span></h1>
+ <h1><span class="text-gradient">{result.join(" ")}</span></h1>

In the package.json, add the following script:

"scripts": {
    ...
    "postinstall": "sorodev build && sorodev deploy hello_soroban && sorodev make-binding hello_soroban"
}

Then run:

npm i
npm run dev

Then open http://localhost:4321/, you should see Hello Sorodev.

Create a Next.js project

Release files for sorodev 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sorodev 0.0.2
File Size Uploaded
sorodev-0.0.2.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sorodev 0.0.2
File Interpreter ABI Platform
sorodev-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 40.8 kB

Release files / sorodev-0.0.2.tar.gz

Download URL sorodev-0.0.2.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
68a67a6037e2374f1c9f9412bcfc32f0178207e0cb74795f4fa190a70deba315
BLAKE2b-256 checksum
How to use checksums
c9742a516a862506ca6cf8914ab3b78a02a8dc3acb9116e6fc54dc833afac006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / sorodev-0.0.2-py3-none-any.whl

Download URL sorodev-0.0.2-py3-none-any.whl
Size 21.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a72cc423589265564df82b031c106b7b1694e31175f5b2afb705e011bd06374
BLAKE2b-256 checksum
How to use checksums
cb6324aaf0f04406a22da032eb0e2bf582d88df9c4f2fd55a010c17493a42dce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page