Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polar: Development framework for Secret contracts #15

Open
udit-gulati opened this issue Jul 5, 2021 · 4 comments
Open

Polar: Development framework for Secret contracts #15

udit-gulati opened this issue Jul 5, 2021 · 4 comments
Labels
approved This grant has been approved by the Secret Foundation and will be funded completed This grant has been approved, fully implemented, and shipped

Comments

@udit-gulati
Copy link

udit-gulati commented Jul 5, 2021

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

  • Udit Gulati (Backend Developer)
  • Coco (Blockchain Developer)
  • Anurag Chandel (QA, Frontend Developer)

Team Website

Team's experience

  • Udit is currently a developer at a trading desk developing applications requiring low latency and high reliability. He has built scientific libraries in Ruby in past under GSoC and Ruby association grants.
  • Coco has actively been part of crypto sphere for past 1.5 years and has built several DApps in the past.
  • Anurag is currently a QA engineer at United Health Group.

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

  • Automatically discover the contract code existing in the specified directory of the project, support independent compilation between contracts.
    • Structure
      • artifacts
      • contracts
      • scripts
      • test
      • polar.config.js
  • User is able to compile SCRT contracts using polar(polar compile).
  • Defining and adding parser for Network configs.
  • User is able to init smart contract project from templates using (polar init).

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

  • Support deploying contracts to the corresponding network through configuration files and command line options.(polar deploy).
  • Support checkpoints storage for deployments.
  • User is able to communicate/transact with smart contracts using REPL.
  • Provide several built-in different contract template boiler-plate templates.

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

  • Provide a basic contract testing framework based on Mocha Assert or Jest.
  • Create more project template repos that polar init can use. User can then choose from these templates to init from.
  • Complete user docs for polar and host the docs WebApp.

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
Copy link
Contributor

This proposal is under review

@reuvenpo reuvenpo added the approved This grant has been approved by the Secret Foundation and will be funded label Aug 2, 2021
@guyz
Copy link

guyz commented Aug 3, 2021

Approved! Excited to see this developed!

@secretchaingirl
Copy link

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

@PrivatePixels
Copy link

Also excited for this🤙🏾

@reuvenpo reuvenpo added the completed This grant has been approved, fully implemented, and shipped label Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This grant has been approved by the Secret Foundation and will be funded completed This grant has been approved, fully implemented, and shipped
Projects
None yet
Development

No branches or pull requests

6 participants