Skip to content

Commit

Permalink
Merge branch 'main' into feat/builder_amount
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Nov 29, 2024
2 parents ce35446 + a11a924 commit 1d4aa0e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 16 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions FULL_HELP_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ Generate code client bindings for a contract
* `json` — Generate Json Bindings
* `rust` — Generate Rust bindings
* `typescript` — Generate a TypeScript / JavaScript package
* `python` — Generate Python bindings



Expand Down Expand Up @@ -306,6 +307,14 @@ Generate a TypeScript / JavaScript package



## `stellar contract bindings python`

Generate Python bindings

**Usage:** `stellar contract bindings python`



## `stellar contract build`

Build a contract from source
Expand Down Expand Up @@ -1654,7 +1663,7 @@ Creates and funds a new account with the specified starting balance
* `--destination <DESTINATION>` — Account Id to create, e.g. `GBX...`
* `--starting-balance <STARTING_BALANCE>` — Initial balance in stroops of the account, default 1 XLM

Default value: `10000000`
Default value: `10_000_000`



Expand Down Expand Up @@ -1713,7 +1722,7 @@ Sends an amount in a specific asset to a destination account
* `--asset <ASSET>` — Asset to send, default native, e.i. XLM

Default value: `native`
* `--amount <AMOUNT>` — Amount of the aforementioned asset to send
* `--amount <AMOUNT>` — Amount of the aforementioned asset to send. e.g. `10_000_000` (1 XLM)



Expand Down
8 changes: 8 additions & 0 deletions cmd/soroban-cli/src/commands/contract/bindings.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod json;
pub mod python;
pub mod rust;
pub mod typescript;

Expand All @@ -12,6 +13,9 @@ pub enum Cmd {

/// Generate a TypeScript / JavaScript package
Typescript(typescript::Cmd),

/// Generate Python bindings
Python(python::Cmd),
}

#[derive(thiserror::Error, Debug)]
Expand All @@ -24,6 +28,9 @@ pub enum Error {

#[error(transparent)]
Typescript(#[from] typescript::Error),

#[error(transparent)]
Python(#[from] python::Error),
}

impl Cmd {
Expand All @@ -32,6 +39,7 @@ impl Cmd {
Cmd::Json(json) => json.run()?,
Cmd::Rust(rust) => rust.run()?,
Cmd::Typescript(ts) => ts.run().await?,
Cmd::Python(python) => python.run()?,
}
Ok(())
}
Expand Down
19 changes: 19 additions & 0 deletions cmd/soroban-cli/src/commands/contract/bindings/python.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use std::fmt::Debug;

use clap::Parser;

#[derive(Parser, Debug, Clone)]
#[group(skip)]
pub struct Cmd {}

#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("python binding generation is not implemented in the stellar-cli, but is available via the tool located here: https://github.com/lightsail-network/stellar-contract-bindings")]
NotImplemented,
}

impl Cmd {
pub fn run(&self) -> Result<(), Error> {
Err(Error::NotImplemented)
}
}

0 comments on commit 1d4aa0e

Please sign in to comment.