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.
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.
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.
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 theinit
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
polar compile
).polar init
).Milestone 2 ( Deploy, checkpoints storage, REPL ) - 4 weeks (July 14 - August 31)
polar deploy
).Milestone 3 ( Test, complex examples showcase ) - 4 weeks (September 1 - September 30)
polar init
can use. User can then choose from these templates to init from.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.