Skip to content

Commit

Permalink
refactor: rename to nibiru-wasm and cleanup Cargo.tomls
Browse files Browse the repository at this point in the history
  • Loading branch information
Unique-Divine committed Sep 25, 2024
1 parent 90bc6e4 commit 28e952f
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 62 deletions.
41 changes: 17 additions & 24 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ members = ["scripts", "packages/*", "nibiru-std", "contracts/*"]
exclude = ["packages/msig-ez"]
resolver = "2"
package.version = "0.1.0"
package.homepage = "https://github.com/NibiruChain/cw-nibiru"
package.repository = "https://github.com/NibiruChain/cw-nibiru"
package.homepage = "https://github.com/NibiruChain/nibiru-wasm"
package.repository = "https://github.com/NibiruChain/nibiru-wasm"
package.edition = "2021"

# Dependencies can be inherited from a workspace by specifying the dependency in
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# NibiruChain/cw-nibiru
# NibiruChain/nibiru-wasm

Smart contract sandbox for Nibiru Chain.
Wasm smart contract sandbox for Nibiru Chain.

```bash
⚡ NibiruChain/cw-nibiru
├── 📂 artifacts # compiled .wasm smart contracts for cw-nibiru
⚡ NibiruChain/nibiru-wasm
├── 📂 artifacts # compiled .wasm smart contracts for nibiru-wasm
├── 📂 contracts # Smart contracts for Nibiru Chain
└── 📂 nibi-stargate # Example contract using nibiru-std for CosmosMsg::Stargate
└── 📂 incentives # Generalized incentives over time for locked tokens
Expand All @@ -27,25 +27,19 @@ Smart contract sandbox for Nibiru Chain.
├── Cargo.lock
└── README.md
```
## Install Cargo

- Install `cargo` with `curl`
```bash
curl https://sh.rustup.rs -sSf | sh
```
- Check `cargo` version
```bash
cargo version
```

## Hacking

Install `just` to run project-specific commands.

```bash
# Install `cargo` via rustup if you don't already have it.
curl https://sh.rustup.rs -sSf | sh

# Install just
cargo install just
```

You can view the list of available development commands with `just -ls`.

Ref: [github.com/casey/just](https://github.com/casey/just)
Ref: [github.com/casey/just](https://github.com/casey/just)
4 changes: 2 additions & 2 deletions contracts/broker-bank/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "broker-bank"
version = "0.1.0"
edition = "2021"
homepage = "https://nibiru.fi"
repository = "https://github.com/NibiruChain/cw-nibiru"
homepage = { workspace = true }
repository = "https://github.com/NibiruChain/nibiru-wasm"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
Expand Down
4 changes: 2 additions & 2 deletions contracts/core-cw3-fixed-msig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2021"
description = "Implementing cw3 with an fixed group multisig"
license = "Apache-2.0"
repository = "https://github.com/NibiruChain/cw-nibiru"
homepage = "https://cosmwasm.com"
repository = "https://github.com/NibiruChain/nibiru-wasm"
homepage = { workspace = true }
documentation = "https://docs.cosmwasm.com"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions contracts/core-cw3-flex-msig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ authors = ["Ethan Frey <ethanfrey@users.noreply.github.com>"]
edition = "2021"
description = "Implementing cw3 with multiple voting patterns and dynamic groups"
license = "Apache-2.0"
repository = "https://github.com/NibiruChain/cw-nibiru"
homepage = "https://cosmwasm.com"
repository = "https://github.com/NibiruChain/nibiru-wasm"
homepage = { workspace = true }
documentation = "https://docs.cosmwasm.com"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions contracts/core-shifter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "shifter"
version = "0.2.0"
edition = "2021"
homepage = "https://nibiru.fi"
repository = "https://github.com/NibiruChain/cw-nibiru"
homepage = { workspace = true }
repository = "https://github.com/NibiruChain/nibiru-wasm"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
Expand Down
4 changes: 2 additions & 2 deletions contracts/nibi-stargate-perp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "nibi-stargate-perp"
version = "0.2.0"
edition = "2021"
homepage = "https://nibiru.fi"
repository = "https://github.com/NibiruChain/cw-nibiru"
homepage = { workspace = true }
repository = "https://github.com/NibiruChain/nibiru-wasm"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
Expand Down
8 changes: 4 additions & 4 deletions contracts/nibi-stargate-perp/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ pub fn execute(
};

// TODO: feat(nibiru-std): Fn to convert cosmwasm_std::Decimal to
// protobuf strings for sdk.Dec [with tests] | https://github.com/NibiruChain/cw-nibiru/issues/99
// protobuf strings for sdk.Dec [with tests] | https://github.com/NibiruChain/nibiru-wasm/issues/99
let cosmos_msg: CosmosMsg = nibiru::perp::MsgMarketOrder {
sender: contract_addr,
pair,
side: side.into(),
// TODO: sdk.Dec https://github.com/NibiruChain/cw-nibiru/issues/99
// TODO: sdk.Dec https://github.com/NibiruChain/nibiru-wasm/issues/99
quote_asset_amount: quote_amount.to_string(),
// TODO: sdk.Dec https://github.com/NibiruChain/cw-nibiru/issues/99
// TODO: sdk.Dec https://github.com/NibiruChain/nibiru-wasm/issues/99
leverage: leverage.to_string(),
// TODO: sdk.Dec https://github.com/NibiruChain/cw-nibiru/issues/99
// TODO: sdk.Dec https://github.com/NibiruChain/nibiru-wasm/issues/99
base_asset_amount_limit: base_amount_limit.to_string(),
}
.into_stargate_msg();
Expand Down
5 changes: 2 additions & 3 deletions contracts/nibi-stargate/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# cw-nibiru/contracts/nibi-stargate
# nibiru-wasm/contracts/nibi-stargate

This smart contract showcases usage examples for creating and managing fungible tokens native to Nibiru Chain.


Table of Contents

- [Guide: Using the Smart Contract](#guide-using-the-smart-contract)
Expand All @@ -19,7 +18,7 @@ Table of Contents
## Guide: Using the Smart Contract

A pre-built version of the Wasm bytecode for every smart contract in the
[NibiruChain/cw-nibiru](https://github.com/NibiruChain/cw-nibiru) repo can be
[NibiruChain/nibiru-wasm](https://github.com/NibiruChain/nibiru-wasm) repo can be
found in the "artifacts" directory.

### Set environmnent vars
Expand Down
4 changes: 2 additions & 2 deletions contracts/nusd-valuator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "nusd-valuator"
version = "0.1.0"
edition = "2021"
homepage = "https://nibiru.fi"
repository = "https://github.com/NibiruChain/cw-nibiru"
homepage = { workspace = true }
repository = "https://github.com/NibiruChain/nibiru-wasm"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
Expand Down
2 changes: 1 addition & 1 deletion packages/core-controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "controller"
version = "0.2.0"
edition = "2021"
homepage = "https://nibiru.fi"
repository = "https://github.com/NibiruChain/cw-nibiru"
repository = "https://github.com/NibiruChain/nibiru-wasm"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
Expand Down
2 changes: 1 addition & 1 deletion packages/nibi-dev/src/gh_release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub fn headers_user_agent(
) -> anyhow::Result<(header::HeaderName, header::HeaderValue)> {
let header_name = header::HeaderName::from_str("User-Agent")?;
let header_value = header::HeaderValue::from_str(
"repo:NibiruChain/cw-nibiru_crate::nibi-dev",
"repo:NibiruChain/nibiru-wasm_crate::nibi-dev",
)?;
Ok((header_name, header_value))
}
Expand Down

0 comments on commit 28e952f

Please sign in to comment.