scrtlabs / Grants

Repository for grant proposal submissions
41 stars 22 forks source link

Polar: Development framework for Secret contracts #15

Open udit-gulati opened 3 years ago

udit-gulati commented 3 years ago

Project Description

This is an application for a grant programme: Polar: Development framework for Secret contracts

We intend to create a development environment for developers to effortlessly compile, test and deploy secret contracts. The aim of the project is for user to only worry about the implementation of secret contract and not much about further steps in development. It will facilitate features such as initiating project repo from contract templates, easy compilation of contracts, deployment to testnet and contract testing framework.

Problem / Solution

Currently in order to develop secret smart contract or to build a secret DApp consisting of multiple smart contracts, a developer has to setup the contract repository and the environment manually (consisting of understanding and executing multiple commands) which consumes time and effort.

Popular blockchains such as Ethereum, Polkadot have Truffle/Hardhat and Redspot respectively for the very same purposes and an addition of such framework to Secret Network would be quite a useful one.

Detailed product description

Secret Contract project init

Polar will provide one command step to initiate a project repo with the secret contract boiler plate code. The command will have parameters to choose single contract or multi contracts template. The project repo will also contain the polar.config.js file with some parameters already configured according to user's requirements (this can be extended further by providing more parameters to the init command).

Contract compilation

In order to compile a secret project and generate metadata, currently a user has to go to each contract's directory and manually generate the .wasm file for it and another step to generate metadata .json files and has to further copy them to some other directory. Polar will do all of these things in one simple command and would provide proper logs for the same. It'll automatically detect all the contracts and will handle the cross-contracts compilation. Polar will also provide the user an option to do these using a docker image instead of installing the rust environment on the local machine. There would also be the checking of presence of the correct rust environment required for compilation if running on local machine.

Contract deployment

User can add the network details and account details to polar.config.js and simply deploy the contracts to a network specified in the config. Polar generates the optimized file using the docker image and deploy that to the network.

REPL interface

Polar will provide the ability to get the deployed contract instance through JS and support simple interaction with the contract interface.

Testing

Polar will provide wrapper over the rust unit and integration test commands and will provide a basic contract testing framework based on Mocha Assert or Jest.

Value capture for Secret Network ecosystem

The project would be a significant addition to the Secret Network ecosystem as any new developer would have time and effort saved while developing secret contracts that it'd lead to more developers willing to develop DApps on top of Secret network.

Team members

Team Website

Team's experience

Team Code Repos

To check the progress of the work done so far, please follow the instructions on the README.

Development Roadmap

Milestone 1 ( Environment, Project structure, Compilation ) - 4 weeks (June 14 - July 13) - COMPLETED

Milestone 2 ( Deploy, checkpoints storage, REPL ) - 4 weeks (July 14 - August 31)

Milestone 3 ( Test, complex examples showcase ) - 4 weeks (September 1 - September 30)

Grant request

We will require 3 months to complete this project. We intend to have 3 developers, at a total cost of $30k payable entirely in SCRT with 3 disbursements, each payment of $10k (in SCRT using the conversion rate at the time of payment) after completion of each milestone.

cankisagun commented 3 years ago

This proposal is under review

guyz commented 3 years ago

Approved! Excited to see this developed!

secretchaingirl commented 3 years ago

Congratulations, guys! I'm looking forward to polar :-D.

PrivatePixels commented 3 years ago

Also excited for this🤙🏾