Giter Site home page Giter Site logo

omahs / vectis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nymlab/vectis

0.0 0.0 0.0 5.79 MB

A non-custodial smart contract wallet project to enhance DApp user experience; it supports social recovery, guardianship and relaying capability for gas provisioning and auditability. For more details, please see our documentation

Home Page: https://nymlab.github.io/vectis/vectis_wallet

License: Apache License 2.0

Shell 1.03% Rust 65.60% TypeScript 33.23% Makefile 0.03% Dockerfile 0.11%

vectis's Introduction

Vectis - Smart Contract Wallet

Cosmowasm 0.20.0 codecov_img

Website

Discord

Overview

Smart Contract Wallet allows user to interact with DAPPs on the blockchain with the same amount of autonomy of a classic non-custodial solution, with the additional functionalities designed to provide the user with better experience and security.

SCW also provide functions that allow businesses to satisfy regulatory requirements regarding support of users, transparency, separation of control duties and verifiability.

VectisDAO is the organisation that provides governance to the this infrastructure. VectisDAO lives on Juno Network and leverages the DAO DAO stack. Every SCW wallet has the right to purchase a set amount of Govec tokens at a set price, the Govec will be minted and can be staked to vote. Contributors can enter VectisDAO with investment (typically development and other useful efforts). The amount of Govec from contributions will be determined by the DAO.

Through IBC, Vectis wallets can also be deployed on other chains. From the perspective of DAO participation, there is no difference between a wallet on Juno Network or others. Staking and voting will be done via IBC calls from the wallet.

Please see our wiki for details.


Hack

Contract Tests

# For individual contract tests
cd contracts/contract-you-want-to-test
cargo test

# For all tests
cargo test

Integration Tests

Docker Images

1. Set Environment

First we set up the two networks (one node each) locally. Please ensure you have set up the .env file according to the example.env.
You should check supported chains in cli/config/chains directory.

make nodes-setup
2. Compile Contracts
make build
3. Upload and Instantiate Contracts
make deploy

The deployment of the DAO on the host chain has the following steps:

  1. Relayer: Creates channels between Dao-tunnel and Remote-tunnel
  2. Upload all required contracts (in ./upload.ts) to dao chain + remote chains
    1. Host: Factory, Govec, Proxy, Dao-tunnel, Dao contracts
    2. Remote: Remote-Factory, Proxy, Remote-tunnel
  3. DAO Chain: Instantiate Govec contract (with admin having initial balance for proposing for DAO to deploy Factory)
  4. DAO Chain: Instantiate dao-core contract (which will instantiate one proposal module and one vote module contracts)
    • note: vote contracts also instantiates a new staking contract as we use staked-balance for voting
  5. DAO Chain: Admin propose and execute on DAO to deploy factory and Dao-tunnel contracts
  6. Remote Chain: Remote Admin instantiate Remote-tunnel with Dao-tunnel as port and connection Id from step 1
  7. DAO Chain: Admin propose and execute on DAO to allow ibc-connection to the Remote-tunnel
  8. DAO Chain: Admin propose and execute on DAO to deploy remote-factory
  9. Remote Chain: Execute instantiate remote-factory
  10. DAO Chain: Admin updates Govec staking address to the staking contract in step 4.
  11. DAO Chain: Admin updates Govec minter address to the factory contract addr and dao-tunnel addr
  12. DAO Chain: Admin updates Govec contract DAO_ADDR as DAO
  13. DAO Chain: Admin updates Govec contract admin as DAO (for future upgrades)
  14. DAO Chain: Admin unstakes and burn its govec (exits system)

After upload and deploy contracts it will check the contract have the right checksum and the contracts have DAO as admin.

Native Local Node

Juno Option
Build locally by following instructions

Note: this requires you to do a setup script to seed the accounts use for cli.

Wasmd Option
git clone https://github.com/CosmWasm/wasmd.git
cd wasmd
# replace the v0.18.0 with the most stable version on https://github.com/CosmWasm/wasmd/releases
git checkout v0.24.0
make install

# verify the installation
wasmd version

INFO: make install will copy wasmd to $HOME/go/bin or the default directory for binaries from Go, please make sure that is in your PATH.

1. Start the node
./scripts/wasmd-node-setup.sh
2. Compile smart contracts
make build

Interacting with the blockchain

We are using CosmJS to interact with the smart contracts and Jest as testing framework for client-side tests.

vectis's People

Contributors

j0nl1 avatar whalelephant avatar giovanni-orciuolo avatar iorveth avatar pyramation avatar egidiocasati avatar

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.