Skip to content

Commit

Permalink
Add Fuel / Usdc market
Browse files Browse the repository at this point in the history
  • Loading branch information
dcpp committed Dec 16, 2024
1 parent 987e466 commit 4c35ffe
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 32 deletions.
38 changes: 19 additions & 19 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ members = [

[workspace.package]
authors = ["ComposabilityLabs"]
version = "0.6.7"
version = "0.6.8"
edition = "2021"
license = "Apache-2.0"
rust-version = "1.82.0"

[workspace.dependencies]
anyhow = "1.0.93"
anyhow = "1.0.94"
fuels = { version = "0.66.10", features = ["fuel-core-lib"] }
tokio = { version = "1.41.1", features = ["rt", "macros"] }
tokio = { version = "1.42.0", features = ["rt", "macros"] }

4 changes: 2 additions & 2 deletions spark-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "spark-cli"
description = "Spark Rust CLI for Market & Orderbook contract interactions"
version = "0.6.7"
version = "0.6.8"
authors = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
Expand All @@ -12,7 +12,7 @@ keywords = ["fuel", "sdk", "spark", "cli", "orderbook"]

[dependencies]
anyhow = { workspace = true }
clap = { version = "4.5.21", features = ["derive"] }
clap = { version = "4.5.23", features = ["derive"] }
dotenv = "0.15.0"
fuels = { workspace = true }
spark-market-sdk = { version = "0.6.6" }
Expand Down
39 changes: 32 additions & 7 deletions spark-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Create `.env` file in the project root and initialize `WALLET_SECRET=` with Fuel
## Deploy

ETH address 0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07
BTC address 0x38e4ca985b22625fff93205e997bfc5cc8453a953da638ad297ca60a9f2600bc
USDC address 0x336b7c06352a4b736ff6f688ba6885788b3df16e136e95310ade51aa32dc6f05
TBTC address 0x38e4ca985b22625fff93205e997bfc5cc8453a953da638ad297ca60a9f2600bc
TUSDC address 0x336b7c06352a4b736ff6f688ba6885788b3df16e136e95310ade51aa32dc6f05

### Batch Deploy

Expand Down Expand Up @@ -167,6 +167,22 @@ Owner address: fuel1rmu7c4gjycy4qtvj8798sv04ptq9uq4a6eq9y23w7x8apundtlrs0u000t
0x1ef9ec55122609502d923f8a7831f50ac05e02bdd640522a2ef18fd0f26d5fc7


### Deploy FUEL-USDC market proxy + implementation

```
spark-cli batch deploy-fuel-usdc-proxy
```

Spark CLI v0.6.8

Market version 0.6.6 (1542) deployed to: 0xee459fbb07d7afa5feeac4ecd54cb83bf0c9d7d0ec292a34dbab2ec558728f7f
Proxy deployed to: 0x81e83f73530c262b0dbf5414649a875c48a48144de3c08ff68cb9d54b36f2eaa
Deployment cost: 7798
Owner address: fuel1rmu7c4gjycy4qtvj8798sv04ptq9uq4a6eq9y23w7x8apundtlrs0u000t
0x1ef9ec55122609502d923f8a7831f50ac05e02bdd640522a2ef18fd0f26d5fc7


## Deposit

```
Expand Down Expand Up @@ -290,6 +306,15 @@ spark-cli core fulfill-many \
--contract-id 0x81acb82a64ff799836c19f4e7f9871cf6d13a1e5d286e815f91c26a1b92a8195
```

## Set Paused

```
spark-cli core set-paused \
--paused \
--rpc "mainnet.fuel.network" \
--contract-id 0xee459fbb07d7afa5feeac4ecd54cb83bf0c9d7d0ec292a34dbab2ec558728f7f
```

## Set Protocol Fee

Sets protocol fee
Expand Down Expand Up @@ -396,15 +421,15 @@ spark-cli info account \
```
spark-cli info config \
--rpc "mainnet.fuel.network" \
--contract-id 0xdafe498b31f24ea5577055e86bf77e96bcba2c39a7ae47abaa819c303a45a352
--contract-id 0x81e83f73530c262b0dbf5414649a875c48a48144de3c08ff68cb9d54b36f2eaa
```

## Paused

```
spark-cli info paused \
--rpc "mainnet.fuel.network" \
--contract-id 0xdafe498b31f24ea5577055e86bf77e96bcba2c39a7ae47abaa819c303a45a352
--contract-id 0xee459fbb07d7afa5feeac4ecd54cb83bf0c9d7d0ec292a34dbab2ec558728f7f
```

## Epoch
Expand All @@ -421,8 +446,8 @@ Protocol fee

```
spark-cli info protocol-fee \
--rpc "testnet.fuel.network" \
--contract-id 0x81acb82a64ff799836c19f4e7f9871cf6d13a1e5d286e815f91c26a1b92a8195
--rpc "mainnet.fuel.network" \
--contract-id 0x81e83f73530c262b0dbf5414649a875c48a48144de3c08ff68cb9d54b36f2eaa
```

## Protocol Fee User
Expand Down Expand Up @@ -559,7 +584,7 @@ Owner address: fuel173lqaa6y4jxfjd2suq730uwys3zfg4f6zt9vzx4cc45v3xvlmwlszdvdpz

```
spark-cli registry register \
--market 0xdafe498b31f24ea5577055e86bf77e96bcba2c39a7ae47abaa819c303a45a352 \
--market 0x81e83f73530c262b0dbf5414649a875c48a48144de3c08ff68cb9d54b36f2eaa \
--rpc "mainnet.fuel.network" \
--contract-id 0xbb91b7f9d31ee562b24e35d756ce20913f9752600582f51008c63b2d3792926b
```
Expand Down
7 changes: 6 additions & 1 deletion spark-cli/src/commands/batch/cli.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::commands::batch::{
deploy_all::DeployAllCommand, deploy_eth_usdc_proxy::DeployEthUsdcProxyCommand,
deploy_proxy::DeployProxyCommand, deploy_teth_tusdc_impl::DeployTethTusdcImplCommand,
deploy_fuel_usdc_proxy::DeployFuelUsdcProxyCommand, deploy_proxy::DeployProxyCommand,
deploy_teth_tusdc_impl::DeployTethTusdcImplCommand,
deploy_teth_tusdc_proxy::DeployTethTusdcProxyCommand,
deploy_usdc_usdt_proxy::DeployUsdcUsdtProxyCommand,
};
Expand All @@ -16,6 +17,10 @@ pub(crate) enum BatchCommands {
#[clap(short_flag = 'E')]
DeployEthUsdcProxy(DeployEthUsdcProxyCommand),

/// Deploy a new fuel/usdc market proxy
#[clap(short_flag = 'F')]
DeployFuelUsdcProxy(DeployFuelUsdcProxyCommand),

/// Deploy a new market and proxy contracts and setup them
#[clap(short_flag = 'P')]
DeployProxy(DeployProxyCommand),
Expand Down
Loading

0 comments on commit 4c35ffe

Please sign in to comment.