Skip to content

Commit

Permalink
update galactic express to sails
Browse files Browse the repository at this point in the history
  • Loading branch information
MedovTimur committed Sep 27, 2024
1 parent b022df7 commit 26da9ab
Show file tree
Hide file tree
Showing 28 changed files with 1,497 additions and 1,255 deletions.
267 changes: 178 additions & 89 deletions contracts/Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "2"
members = [
"battleship",
"car-races",
"galactic-express",
"galactic-express/wasm",
"multi-token",
"multisig-wallet",
"multisig-wallet/state",
Expand Down Expand Up @@ -91,15 +91,15 @@ rmrk-types.path = "rmrk/types"

# Gear

gstd = "1.6.0"
gear-wasm-builder = "1.6.0"
gmeta = "1.6.0"
gclient = "1.6.0"
gtest = "1.5.0"
gear-core = "1.6.0"
sails-idl-gen = "0.3.0"
sails-rs = "0.3.0"
sails-client-gen = "0.3.0"
gstd = "=1.5.0"
gear-wasm-builder = "=1.5.0"
gmeta = "=1.5.0"
gclient = "=1.5.0"
gtest = "=1.5.0"
gear-core = "=1.5.0"
sails-idl-gen = "0.5.0"
sails-rs = "0.5.0"
sails-client-gen = "0.5.0"

# External

Expand Down
Binary file removed contracts/galactic-express/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion contracts/galactic-express/.binpath

This file was deleted.

17 changes: 0 additions & 17 deletions contracts/galactic-express/Cargo.toml

This file was deleted.

4 changes: 2 additions & 2 deletions contracts/galactic-express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Deliver the cargo 📦 to the orbit 🌌 using fuel ⛽️ efficiently.
### 🏗️ Building

```sh
cargo b -r -p "galactic-express*"
cargo b -r -p "galactic-express-wasm"
```

### ✅ Testing

```sh
cargo t -r -p "galactic-express*"
cargo t -r -p "galactic-express-app"
```

## Stages
Expand Down
18 changes: 18 additions & 0 deletions contracts/galactic-express/app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "galactic-express-app"
version.workspace = true
edition.workspace = true
license.workspace = true

[dependencies]
gstd = { workspace = true, features = ["debug"] }
sails-rs = { workspace = true, features = ["gtest"] }
num-traits.workspace = true

[dev-dependencies]
gtest.workspace = true
gstd.workspace = true
gear-core.workspace = true
gclient.workspace = true
galactic-express-wasm = { path = "../wasm" }
tokio = "1"
19 changes: 19 additions & 0 deletions contracts/galactic-express/app/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#![no_std]
#![allow(clippy::new_without_default)]

use sails_rs::prelude::*;
mod services;
use services::galactic_express::GameService;
pub struct Program(());

#[program]
impl Program {
pub async fn new(dns_id_and_name: Option<(ActorId, String)>) -> Self {
GameService::init(dns_id_and_name).await;
Self(())
}

pub fn galactic_express(&self) -> GameService {
GameService::new()
}
}
Loading

0 comments on commit 26da9ab

Please sign in to comment.