Giter Site home page Giter Site logo

kaimen-sano / white-whale-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from white-whale-defi-platform/white-whale-core

0.0 0.0 0.0 4.74 MB

Core contracts for White Whale, The Interchain Liquidity Protocol for the Cosmos.

Home Page: https://whitewhale.money

License: MIT License

Shell 5.37% Python 0.24% Rust 94.39%

white-whale-core's Introduction

codecov CII Best Practices Discord badge Twitter handle first-timers-only PRs Welcome

Getting started

To get started with migaloo-core, please go through the contributing guide to see the different ways to contribute to the project.

Resources

  1. Website
  2. LitePaper
  3. Docs
  4. Discord
  5. Twitter
  6. Telegram

Deployed contracts

White Whale Migaloo is a protocol that exists across multiple chains. You can find contract addresses for different chain deployments in the documentation.

Building and Deploying Migaloo

To build and deploy Migaloo's smart contracts, there are a series of deployment scripts under scripts/. You need at least Rust v1.65.0 to compile the contracts.

Build scripts

  • build_release.sh: builds the project artifacts, optimized for production.
  • build_schemas.sh: generates schemas for the contracts.
  • check_artifacts_size.sh: validates the size of the optimized artifacts. The default maximum size is 600 kB, though it is customizable by passing the number of kB to the script. For example check_artifacts_size.sh 400 verifies the artifacts are under 400 kB.

Deployment scripts

The deployment scripts are found under scripts/deployment/. The following is the structure found on under this folder:

.
├── deploy_env
│   ├── base.env
│   ├── chain_env.sh
│   ├── mainnets
│   │   ├── chihuahua.env
│   │   ├── juno.env
│   │   └── terra.env
│   ├── mnemonics
│   │   ├── deployer_mnemonic_testnet.txt
│   │   └── deployer_mnemonic.txt
│   └── testnets
│       ├── archway.env
│       ├── injective.env
│       ├── juno.env
│       ├── local.env
│       └── terra.env
├── deploy_liquidity_hub.sh
├── deploy_pool.sh
├── deploy_vault.sh
├── input
│   ├── pool.json
│   └── vault.json
├── output
│   ├── uni-5_liquidity_hub_contracts.json
│   ├── uni-5_pools.json
│   └── uni-5_vaults.json
└── wallet_importer.sh

There are three main scripts: deploy_liquidity_hub.sh, deploy_pool.sh and deploy_vault.sh. The rest of the scripts in there are used as auxiliary scripts by the main three listed before.

The deploy_env/ folder contains env files defining the parameters for the blockchain where the deployment is going to occur, whether it is a mainnet or testnet deployment.

The input/ folder is used for adding json files containing the config parameters when deploying pools or vaults. The output/ folder is where the scripts will write the data regarding the deployment, in json format. The name of the file follows the following nomenclature: "chain_id"_liquidity_hub_contracts, "chain_id"_pools, "chain_id"_vaults.

  • deploy_liquidity_hub.sh: deploys the liquidity hubs. It can deploy the entire LH or parts of it. To learn how to use it, run the script with the -h flag.
  • deploy_pool.sh: deploys a pool based on the configuration specified at input/pool.json. To learn how to use it, run the script with the -h flag.
  • deploy_vault.sh: deploys a vault based on the configuration specified at input/vault.json. To learn how to use it, run the script with the -h flag.

Notice that to deploy a pool or vault you need to have deployed the pool or vault factory respectively.

Here are some examples:

scripts/deployment/deploy_liquidity_hub.sh -c juno -d all
scripts/deployment/deploy_liquidity_hub.sh -c juno -d vault-network
scripts/deployment/deploy_pool-sh -c juno -p scripts/deployment/input/pool.json
scripts/deployment/deploy_vault-sh -c juno -v scripts/deployment/input/vault.json

Testing Migaloo

To run the tests, run cargo test. You can also run cargo tarpaulin -v to get test code coverage.

Disclaimer

Use the contracts and the White Whale app at your own risk!

Audit

Migaloo core contracts have been audited by SCV-Security. The report can be found here.

Contributing

Contributing Guide

Code of Conduct

Security Policies and Procedures

License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.