https://github.com/tangle-network/protocol-cosmwasm
Webb Protocol Implementation in CosmWasm.
https://github.com/tangle-network/protocol-cosmwasm
cosmos cosmwasm rust wasm
Last synced: 8 months ago
JSON representation
Webb Protocol Implementation in CosmWasm.
- Host: GitHub
- URL: https://github.com/tangle-network/protocol-cosmwasm
- Owner: tangle-network
- License: apache-2.0
- Created: 2022-02-23T22:43:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T14:54:49.000Z (over 3 years ago)
- Last Synced: 2025-03-29T10:33:28.369Z (12 months ago)
- Topics: cosmos, cosmwasm, rust, wasm
- Language: Rust
- Homepage:
- Size: 3.1 MB
- Stars: 24
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Webb Protocol CosmWasm
🕸️ Webb Protocol CosmWasm! ⧫
⚠️ Beta Software ⚠️
## Introduction
This repository contains the Cosmwasm implementation of **Webb Protocol**, which would be used for *Cosmos SDK* blockchains.
## Contracts layout
```
contracts/
|___anchor/ # Anchor(FixedDepositAnchor) contract
|___anchor-handler/ # Contract for executing the creation & modification of anchor
|___mixer/ # Mixer contract
|___signature-bridge/ # Contract for managing voting, resource, and maintainer composition through signature verification
|___tokenwrapper/ # Contract for wrapping pooled assets and minting pool share tokens
|___tokenwrapper-handler/ # Contract for executing the creation & modification of token-wrapper
|___vanchor/ # Variable Anchor contract
```
## Building the contracts(wasm)
### Prerequisites
#### Install Rust & dependency
Install the latest version of Rust by following the instructions [here](https://www.rust-lang.org/tools/install).
Add the compilation target.
```
rustup default stable
rustup target add wasm32-unknown-unknown
```
### Building
To build the contract, run the following command.
```
cargo wasm
```
You can see the output wasm file in the **target/wasm32-unknown-unknown/release** directory.
For the optimization, run the following command.
**Important**: You will need [docker](https://www.docker.com/) installed to run this command.
```
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.12.5
```
Then, you can see the output wasm file in the **artifacts** directory.
## Testing
Run the following command to run the unit tests.
```
cargo test --release
```
## License
Licensed under Apache License 2.0.
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the GPLV3 license, shall
be licensed as above, without any additional terms or conditions.