From 7bcfaf1de8b4159b2539ef4f02b56246b77fda5d Mon Sep 17 00:00:00 2001 From: Varex Silver Date: Wed, 3 Aug 2022 13:35:38 +0300 Subject: [PATCH 1/6] Typechain-Polkadot-Follow-Up Grant Application --- applications/typechain-polkadot-follow-up.md | 220 +++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 applications/typechain-polkadot-follow-up.md diff --git a/applications/typechain-polkadot-follow-up.md b/applications/typechain-polkadot-follow-up.md new file mode 100644 index 00000000000..93b7d2d652f --- /dev/null +++ b/applications/typechain-polkadot-follow-up.md @@ -0,0 +1,220 @@ + +# W3F Grant Proposal + +- **Project Name:** [Typechain-Polkadot](https://github.com/Supercolony-net/typechain-polkadot) +- **Team Name:** [SuperColony](https://github.com/Supercolony-net) +- **Payment Address:** ERC 20 ADDRESS: + 0xE1B19cE32866cDE87F8f59C7C2C5f90E093A6942 +- **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 3 + + +## Project Overview :page_facing_up: + +### Overview + +Nowadays, when technologies are growing faster and faster, we should think about optimizations of different routine processes and making older stuff better. One of these optimizations is to make code typesafe that will be flexible in different situations. + +When a smart contract is being written, front-end developer receives file representation of it in the format called Application Binary Interface (ABI). One ABI per each contract, new ABI for every update of a contract. + +Information about how to interact with a contract (methods names, arguments & returns types etc.) is included in this ABI file. It is not quite human-readable, so extraction of that information becomes a challenge. We need to have correct type definitions for each contract in TypeScript. + +Interaction with blockchain is done with polkadot.js library, which only has abstract definitions for the contract in use, thus users' code cannot be typesafe. And Typechain-Polkadot can change it. + +This Grant is a follow-up to the previous grant, [W3F Grant Proposal](https://github.com/w3f/Grants-Program/pull/992). +We have decided to add new tool that will help developers to easy integrate typechain to their projects, and it will be also compatible with Redspot (if redspot was used to compiler project, you can just left most of things). +We have some updates in our team, so check it out. And also we made more work on Milestone 1 than we thought, so now it'll be easier to add new features to the project, so we considered to reestimate our time. + +### Usage of Typechain-compiler + +```bash + npx typechain-compiler --config config.json +``` + +Also you can set some additional arguments like `--noCompile`, `--noTypechain`, `--release` + +Config interface will be something like this: +```typescript +export interface Config { + projectFiles: string[]; // Path to all project files, everystring in glob format + skipLinting : boolean; // Skip linting of project files + artifactsPath : string; // Path to artifacts folder, where artifacts will be stored it will save both .contract and .json (contract ABI) + typechainGeneratedPath : string; // Path to typechain generated folder +} +``` + +### Project Details + +Typesafe contracts' descriptions can be generated automatically by a script, taking a list of ABIs as an input, giving usable TS type definitions and even runtime code as its output. + +Given, that a front-end developer needs to do this with every contracts update, such tool would save a lot of time and prevent mistakes of misusing smart contracts. It is installed as a package with built-in CLI. + +When contracts descriptions come both with ABI and source code (`*.contract` files), our tool will provide means for deployment as well. + + +### Ecosystem Fit + +- Where and how does your project fit into the ecosystem? + +There is a whole side to every project in the ecosystem - that is the front-end side of contract integration, - that will find use for Typechain-Polkadot during development process. + +- Who is your target audience? + +Our main target audience is front-end and smart-contract developers of Polkadot projects. + +- What need(s) does your project meet? + +Our project speeds up the front-end integration of Polkadot/Substrate/Kusama contracts. As well as brings type safety to developers' code, when dealing with contracts. For smart contract developers, it simplifies integration test writing. + +- Are there any other projects similar to yours in the Substrate / Polkadot / Kusama ecosystem? + +No, we are the first project of the kind in the ecosystem. However, in Solidity ecosystem, a simmilar project already exists: [Typechain](https://www.npmjs.com/package/typechain). + + +## Team :busts_in_silhouette: + +### Team members + +- **Markian Ivanichok** (СEO of Supercolony) +- **Toma Sadova** (Product Owner | Supercolony) +- **Green Baneling** (Blockchain Core Rust Engineer | Supercolony) +- **Varex Silver** (Blockchain developer | Supercolony) +- **Artem Lech** (Blockchain developer | Supercolony) + +### Contact + +- **Contact Name:** Toma Sadova +- **Contact Email:** toma.sadova@supercolony.net +- **Website:** [supercolony.net](https://supercolony.net/) + +### Legal Structure + +- **Registered Address:** The registered office shall be in 16192 Coastal Highway, Lewes, Delaware 19958, County of Sussex, USA. +- **Registered Legal Entity:** SUPERCOLONY CORP. + +### Team's experience + +**Markian Ivanichok** +CEO of Supercolony, Blockchain entrepreneur, Software Engineer. Started my engineering career back when I was 15. Since then, I developed and got a lot of experience in engineering and leadership. Gained entrepreneur experience by founding a couple of startups. Inspired, co-founded and invested in Sector F, one of the top consulting companies in Ukraine that helps entrepreneurs to move faster. Since the beginning of this year, co-founded and led Supercolony, a Polkadot venture studio that is dedicated to building and creating of Polkadot’s ecosystem. + +**Toma Sadova** +Toma is Market Growth Lead, Product Owner of OpenBrush, and the main organizer of the [the biggest WASM conference](https://wasm-conference.com/). Toma started her career when she was 14. Since then, Toma has gained a lot of experience in IT technologies, management, leadership and crypto. She switched 4 career paths and figured out that blockchain/crypto is her calling! + +**Green Baneling** +Blockchain Core Developer +Primary programming languages are: C++, Go, Rust + +Finished the faculty of applied mathematics(Master degree). Participated in programming competitions during education. Has worked as a programmer for around 6 years. + +Was a freelancer the first year, creating an application for IOS(Swift), creating modules for the desktop application on C++. After that, spent 2 years in a company which created software for TV devices(C++/ Haxe). After which, for 3 years, worked on different blockchain projects(C++/Go/Rust/Solidity/Js). + +**Varex Silver** +Blockchain Developer. + +Student of Computer Science at the Kyiv National University of Taras Shevchenko. Participated in programming competitions of different stages in school since 2017 (C++). +Was a Backend developer(Go), Solidity developer(Solidity, Hardhat, Typescript), and now Blockchain developer(Rust, Typescript). + +**Artem Lech** +Blockchain Developer. + +Student of Applied Mathematics at the Kyiv National University of Taras Shevchenko. Started programming from 2016, participated in a lot of Ukrainian and international competitions of competitive programming. Worked as a lecturer of algorithms at school of competitive programming and as Intern Backend Engineer (Rust). Now works as Blockhain Developer on Polkadot Blockchain (Rust, Typescript). + +### Team Code Repos + +- https://github.com/Supercolony-net + +Please also provide the GitHub accounts of all team members. If they contain no activity, references to projects hosted elsewhere or live are also fine. + +- https://github.com/xgreenx +- https://github.com/varex83 +- https://github.com/Artemka374 + +### Team LinkedIn Profiles (if available) + +- https://www.linkedin.com/in/mivanichok/ +- https://www.linkedin.com/in/toma-sadova/ +- https://www.linkedin.com/in/bogdan-ogorodniy/ +- https://www.linkedin.com/in/artem-fomiuk-31249b226/ + +## Development Status :open_book: + +[The project](https://github.com/Supercolony-net/typechain-polkadot) is already a work-in-progress. + + +## Development Roadmap :nut_and_bolt: + +### Overview + +We have decided to describe a full roadmap of an Typechain here, with estimates. However, the funding we request at this stage is for milestones 2-3. +* **Total Estimated Duration:** 15 weeks +* **Full-Time Equivalent (FTE):** 2-2.5 +* **Total Costs:** 97 000 USD + +## Previous work + + +#### Milestone 1 - MVP, first application and testing. + +* **Estimated duration:** 8 weeks +* **FTE:** 2 +* **Costs:** 44,800 USD + +| Number | Deliverable | Specification | +| ------ | ----------- | ------------- | +| 0a | License | MIT | +| 0b | Documentation | We will provide TypeScript code examples of this package in use (some can be already found [here](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#usage-examples)). As well, as inline documentation, JSDoc and its features description. | +| 1 | TS types | We will research & match types from ABI to TypeScript, compatible with [polkadot{.js} v8](https://polkadot.js.org) library. Separately, for methods' arguments and return values. Files with types definition will be generated. | +| 2 | Runtime code | Prepare output(its draft can be seen in [technical specification](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#generated-code-draft)) of runtime code with contracts' methods implementation. At this point we have minimal viable coverage of the ABI types, original methods' names, and general types for methods' options, without specifics for contract's [namespaces](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#namespaces). | +| 3 | Testing | Minimal coverage of PSP22 contract with integration tests. We will be testing correctness of the derived types of the arguments and return values. | +| 4 | NPM Packaging | Prepare the repository to work through CLI as a package. In TypeScript, as is, without translation to JavaScript. We will publish the package to [NPM repository](https://npmjs.com) and provide set-up instructions (i.e. for [installation](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#set-up), [input](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#input) & [output](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#output)). | + + +## Current work - Scope of this grant + + +#### Milestone 2 - Full coverage for ABIs’ types. Contracts deployment. + +* **Estimated duration:** 8 weeks +* **FTE:** 2 +* **Costs:** 44,800 USD + +| Number | Deliverable | Specification | +| ------ | ----------- | ------------- | +| 0a | License | MIT | +| 0b | Documentation | We will cover new-added features in documentation and usage examples. | +| 1 | Investigation | Broaden types definitions for methods arguments and return values (to full coverage). | +| 2 | Parser & generators modules | Design and implement a new parser module for ABI JSON to work with different versions of the ABI. Parser's output structure serves as an input for generators. Refactor, replace inlne generation with parser to generator flow. | +| 3 | Contract deployment | Support of parsing `*.contract` files. Provide means for contract deployment. | +| 4 | Testing | Full coverage of PSP22 contract with integration tests. Both for contract usage and deployment. We will be testing arguments' & return values' types correctness. | + + +#### Milestone 3 - Optimization. Improve type system of the generated code. + +* **Estimated duration:** 7 weeks +* **FTE:** 2 +* **Costs:** 52,500 USD + +| Number | Deliverable | Specification | +|--------| ----------- | ------------- | +| 0a | License | MIT | +| 0b | Documentation | We will cover new-added features in documentation and usage examples. | +| 1 | Precise methods definitions | Refine definitions and bahavior of contracts methods (i.e. methods' arguments and returns), depending on namespace, call options and properties of the method, like `payable` & `mutable`. E.g. preamptive querying for transaction calls, controlled by a call options flag. | +| 2 | Methods' names | Format methods' names in the output from original `MethodTrait::method_name` to more user-friendly `methodName` naming scheme, while resolving overlap in formatted names. | +| 3 | Contract classes extension | Extend generated contract classes with useful properties, normally available on the contract (e.g. address, name, signer, etc.). Rely on usage experience in doing so. | +| 4 | IDE hints | Prepare generated code to have more informattive IDE hints, based on both JSDoc and output typesystem itself (if needed). Rely on usage experience in doing so. | +| 5 | NPM Package | Translate package's code to JavaScript upon deployment. Provide informattive CLI, when needed. Make sure to have a cross-platform CLI support. | +| 6 | Typechain-compiler | Tool that will be easy-to-use for big projects to compile Rust code and then generate typechain definitions. | + + +## Future work +After this grant, we will be maintaining the project to keep up with new emerging ecosystem standards and also listen to issues from community and update the tool to make the process of transformation a nicer experience for the developers and teams. We are going to work on integration with Swanky project. + +## Additional Information :heavy_plus_sign: + +We haven’t applied for any other grant programs for this project. + +**How did you hear about the Grants Program?** + +Have a number of approved applications: +- OpenBrush +- Sol2Ink +- Typechain-polkadot (Milestone 1) \ No newline at end of file From 07a032c460419bd0cffd07572d39f118aaf1119d Mon Sep 17 00:00:00 2001 From: varex83 <35969035+varex83@users.noreply.github.com> Date: Wed, 3 Aug 2022 19:59:28 +0300 Subject: [PATCH 2/6] Update typechain-polkadot-follow-up.md --- applications/typechain-polkadot-follow-up.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/typechain-polkadot-follow-up.md b/applications/typechain-polkadot-follow-up.md index 93b7d2d652f..662e60f7f3f 100644 --- a/applications/typechain-polkadot-follow-up.md +++ b/applications/typechain-polkadot-follow-up.md @@ -190,7 +190,7 @@ We have decided to describe a full roadmap of an Typechain here, with estimates. #### Milestone 3 - Optimization. Improve type system of the generated code. * **Estimated duration:** 7 weeks -* **FTE:** 2 +* **FTE:** 2.5 * **Costs:** 52,500 USD | Number | Deliverable | Specification | @@ -217,4 +217,4 @@ We haven’t applied for any other grant programs for this project. Have a number of approved applications: - OpenBrush - Sol2Ink -- Typechain-polkadot (Milestone 1) \ No newline at end of file +- Typechain-polkadot (Milestone 1) From 50d6655f3ce4c18f627493fe8b9a66dd32abc19c Mon Sep 17 00:00:00 2001 From: Toma | SUPERCOLONY Date: Fri, 5 Aug 2022 16:49:52 +0300 Subject: [PATCH 3/6] Update typechain-polkadot-follow-up.md --- applications/typechain-polkadot-follow-up.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/typechain-polkadot-follow-up.md b/applications/typechain-polkadot-follow-up.md index 662e60f7f3f..aac235fbdce 100644 --- a/applications/typechain-polkadot-follow-up.md +++ b/applications/typechain-polkadot-follow-up.md @@ -185,7 +185,7 @@ We have decided to describe a full roadmap of an Typechain here, with estimates. | 2 | Parser & generators modules | Design and implement a new parser module for ABI JSON to work with different versions of the ABI. Parser's output structure serves as an input for generators. Refactor, replace inlne generation with parser to generator flow. | | 3 | Contract deployment | Support of parsing `*.contract` files. Provide means for contract deployment. | | 4 | Testing | Full coverage of PSP22 contract with integration tests. Both for contract usage and deployment. We will be testing arguments' & return values' types correctness. | - +| 5 | Article | We will publish an article that explains features of Typechain, how to use it in projects| #### Milestone 3 - Optimization. Improve type system of the generated code. @@ -203,6 +203,7 @@ We have decided to describe a full roadmap of an Typechain here, with estimates. | 4 | IDE hints | Prepare generated code to have more informattive IDE hints, based on both JSDoc and output typesystem itself (if needed). Rely on usage experience in doing so. | | 5 | NPM Package | Translate package's code to JavaScript upon deployment. Provide informattive CLI, when needed. Make sure to have a cross-platform CLI support. | | 6 | Typechain-compiler | Tool that will be easy-to-use for big projects to compile Rust code and then generate typechain definitions. | +| 7 | Article | We will publish an article that explains how to connect it to the project, describe the types of connection options (directly and through the compiler) | ## Future work From 199f06f6a82420b121e6fc8fcb220cae214db92d Mon Sep 17 00:00:00 2001 From: Toma | SUPERCOLONY Date: Tue, 9 Aug 2022 13:22:42 +0300 Subject: [PATCH 4/6] Update typechain-polkadot-follow-up.md --- applications/typechain-polkadot-follow-up.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/typechain-polkadot-follow-up.md b/applications/typechain-polkadot-follow-up.md index aac235fbdce..b12a9c4c5a8 100644 --- a/applications/typechain-polkadot-follow-up.md +++ b/applications/typechain-polkadot-follow-up.md @@ -147,7 +147,7 @@ Please also provide the GitHub accounts of all team members. If they contain no We have decided to describe a full roadmap of an Typechain here, with estimates. However, the funding we request at this stage is for milestones 2-3. * **Total Estimated Duration:** 15 weeks * **Full-Time Equivalent (FTE):** 2-2.5 -* **Total Costs:** 97 000 USD +* **Total Costs:** 97 300 USD ## Previous work From f6a38e582bec1369599c8209ab886c5920d8e3d1 Mon Sep 17 00:00:00 2001 From: varex83 <35969035+varex83@users.noreply.github.com> Date: Fri, 12 Aug 2022 19:43:54 +0300 Subject: [PATCH 5/6] Update typechain-polkadot-follow-up.md --- applications/typechain-polkadot-follow-up.md | 154 +++++++++---------- 1 file changed, 75 insertions(+), 79 deletions(-) diff --git a/applications/typechain-polkadot-follow-up.md b/applications/typechain-polkadot-follow-up.md index b12a9c4c5a8..25a7b16d255 100644 --- a/applications/typechain-polkadot-follow-up.md +++ b/applications/typechain-polkadot-follow-up.md @@ -1,61 +1,63 @@ +# Typechain grant #2 # W3F Grant Proposal - **Project Name:** [Typechain-Polkadot](https://github.com/Supercolony-net/typechain-polkadot) - **Team Name:** [SuperColony](https://github.com/Supercolony-net) - **Payment Address:** ERC 20 ADDRESS: - 0xE1B19cE32866cDE87F8f59C7C2C5f90E093A6942 +0xE1B19cE32866cDE87F8f59C7C2C5f90E093A6942 - **[Level](https://github.com/w3f/Grants-Program/tree/master#level_slider-levels):** 3 - ## Project Overview :page_facing_up: ### Overview -Nowadays, when technologies are growing faster and faster, we should think about optimizations of different routine processes and making older stuff better. One of these optimizations is to make code typesafe that will be flexible in different situations. +Nowadays, when technologies are growing faster and faster, we should think about optimizing different routine processes and making older stuff better. One of these optimizations is to make code typesafe that will be flexible in different situations. -When a smart contract is being written, front-end developer receives file representation of it in the format called Application Binary Interface (ABI). One ABI per each contract, new ABI for every update of a contract. +When a smart contract is being written, the front-end developer receives its file representation in the Application Binary Interface (ABI) format. One ABI per each contract, a new ABI for every contract update. -Information about how to interact with a contract (methods names, arguments & returns types etc.) is included in this ABI file. It is not quite human-readable, so extraction of that information becomes a challenge. We need to have correct type definitions for each contract in TypeScript. +Information about how to interact with a contract (methods names, arguments & returns types, etc.) is included in this ABI file. It is not relatively human-readable, so extracting that information becomes a challenge. We need to have correct type definitions for each contract in TypeScript. -Interaction with blockchain is done with polkadot.js library, which only has abstract definitions for the contract in use, thus users' code cannot be typesafe. And Typechain-Polkadot can change it. +Interaction with blockchain is done with the polkadot.js library, which only has abstract definitions for the contract in use. Thus users' code cannot be typesafe. And Typechain-Polkadot can change it. -This Grant is a follow-up to the previous grant, [W3F Grant Proposal](https://github.com/w3f/Grants-Program/pull/992). -We have decided to add new tool that will help developers to easy integrate typechain to their projects, and it will be also compatible with Redspot (if redspot was used to compiler project, you can just left most of things). -We have some updates in our team, so check it out. And also we made more work on Milestone 1 than we thought, so now it'll be easier to add new features to the project, so we considered to reestimate our time. +This Grant is a follow-up to the previous grant, [W3F Grant Proposal](https://github.com/w3f/Grants-Program/pull/992).. +We have decided to add a new tool that will help developers easily integrate typechain to their projects. It will also be compatible with Redspot (if redspot was used for compiler projects, you could just leave most of the things). +We have some updates on our team, so check them out. And also, we did more work on Milestone 1 than we thought, so now it'll be easier to add new features to the project, so we considered to reestimate our time. ### Usage of Typechain-compiler -```bash +``` npx typechain-compiler --config config.json + ``` -Also you can set some additional arguments like `--noCompile`, `--noTypechain`, `--release` +Also, you can set some additional arguments like `--noCompile`, `--noTypechain`, `--release` Config interface will be something like this: -```typescript + +``` export interface Config { projectFiles: string[]; // Path to all project files, everystring in glob format skipLinting : boolean; // Skip linting of project files artifactsPath : string; // Path to artifacts folder, where artifacts will be stored it will save both .contract and .json (contract ABI) typechainGeneratedPath : string; // Path to typechain generated folder } + ``` ### Project Details Typesafe contracts' descriptions can be generated automatically by a script, taking a list of ABIs as an input, giving usable TS type definitions and even runtime code as its output. -Given, that a front-end developer needs to do this with every contracts update, such tool would save a lot of time and prevent mistakes of misusing smart contracts. It is installed as a package with built-in CLI. - -When contracts descriptions come both with ABI and source code (`*.contract` files), our tool will provide means for deployment as well. +Given that a front-end developer needs to do this with every contract update, the such tool would save a lot of time and prevent mistakes of misusing smart contracts. It is installed as a package with built-in CLI. +When contract descriptions come both with ABI and source code (`*.contract` files), our tool will provide means for deployment as well. ### Ecosystem Fit - Where and how does your project fit into the ecosystem? -There is a whole side to every project in the ecosystem - that is the front-end side of contract integration, - that will find use for Typechain-Polkadot during development process. +There is a whole side to every project in the ecosystem - that is, the front-end side of contract integration - that will find a use for Typechain-Polkadot during the development process. - Who is your target audience? @@ -63,12 +65,11 @@ Our main target audience is front-end and smart-contract developers of Polkadot - What need(s) does your project meet? -Our project speeds up the front-end integration of Polkadot/Substrate/Kusama contracts. As well as brings type safety to developers' code, when dealing with contracts. For smart contract developers, it simplifies integration test writing. +Our project speeds up the front-end integration of Polkadot/Substrate/Kusama contracts. As well as brings type safety to developers' code when dealing with contracts. For smart contract developers, it simplifies integration test writing. - Are there any other projects similar to yours in the Substrate / Polkadot / Kusama ecosystem? -No, we are the first project of the kind in the ecosystem. However, in Solidity ecosystem, a simmilar project already exists: [Typechain](https://www.npmjs.com/package/typechain). - +No, we are the first project of the kind in the ecosystem. However, in the Solidity ecosystem, a similar project already exists, [Typechain](https://www.npmjs.com/package/typechain). ## Team :busts_in_silhouette: @@ -83,7 +84,7 @@ No, we are the first project of the kind in the ecosystem. However, in Solidity ### Contact - **Contact Name:** Toma Sadova -- **Contact Email:** toma.sadova@supercolony.net +- **Contact Email:** [toma.sadova@supercolony.net](mailto:toma.sadova@supercolony.net) - **Website:** [supercolony.net](https://supercolony.net/) ### Legal Structure @@ -94,18 +95,18 @@ No, we are the first project of the kind in the ecosystem. However, in Solidity ### Team's experience **Markian Ivanichok** -CEO of Supercolony, Blockchain entrepreneur, Software Engineer. Started my engineering career back when I was 15. Since then, I developed and got a lot of experience in engineering and leadership. Gained entrepreneur experience by founding a couple of startups. Inspired, co-founded and invested in Sector F, one of the top consulting companies in Ukraine that helps entrepreneurs to move faster. Since the beginning of this year, co-founded and led Supercolony, a Polkadot venture studio that is dedicated to building and creating of Polkadot’s ecosystem. +CEO of Supercolony, Blockchain entrepreneur, Software Engineer. Started my engineering career back when I was 15. Since then, I have developed and gained a lot of experience in engineering and leadership. Gained entrepreneur experience by founding a couple of startups. Inspired, co-founded, and invested in Sector F, one of the top consulting companies in Ukraine that help entrepreneurs to move faster. Since the beginning of this year, I co-founded and led Supercolony, a Polkadot venture studio that is dedicated to building and creating Polkadot’s ecosystem. **Toma Sadova** -Toma is Market Growth Lead, Product Owner of OpenBrush, and the main organizer of the [the biggest WASM conference](https://wasm-conference.com/). Toma started her career when she was 14. Since then, Toma has gained a lot of experience in IT technologies, management, leadership and crypto. She switched 4 career paths and figured out that blockchain/crypto is her calling! +Toma is the Market Growth Lead, Product Owner of OpenBrush, and the main organizer of the [biggest WASM conference](https://wasm-conference.com/). Toma started her career when she was 14. Since then, Toma has gained a lot of experience in IT technologies, management, leadership, and crypto. She switched four career paths and figured out blockchain/crypto is her calling! **Green Baneling** Blockchain Core Developer Primary programming languages are: C++, Go, Rust -Finished the faculty of applied mathematics(Master degree). Participated in programming competitions during education. Has worked as a programmer for around 6 years. +Finished the faculty of applied mathematics(Master's degree). Participated in programming competitions during education. Has worked as a programmer for around six years. -Was a freelancer the first year, creating an application for IOS(Swift), creating modules for the desktop application on C++. After that, spent 2 years in a company which created software for TV devices(C++/ Haxe). After which, for 3 years, worked on different blockchain projects(C++/Go/Rust/Solidity/Js). +Was a freelancer the first year, creating an application for IOS(Swift), and creating modules for the desktop application on C++. After that, I spent two years in a company that created software for TV devices(C++/ Haxe). After which, for three years, working on different blockchain projects(C++/Go/Rust/Solidity/Js). **Varex Silver** Blockchain Developer. @@ -116,106 +117,101 @@ Was a Backend developer(Go), Solidity developer(Solidity, Hardhat, Typescript), **Artem Lech** Blockchain Developer. -Student of Applied Mathematics at the Kyiv National University of Taras Shevchenko. Started programming from 2016, participated in a lot of Ukrainian and international competitions of competitive programming. Worked as a lecturer of algorithms at school of competitive programming and as Intern Backend Engineer (Rust). Now works as Blockhain Developer on Polkadot Blockchain (Rust, Typescript). +Student of Applied Mathematics at the Kyiv National University of Taras Shevchenko. Started programming in 2016 and participated in a lot of Ukrainian and international competitions of competitive programming. Worked as a lecturer of algorithms at the school of competitive programming and as Intern Backend Engineer (Rust). Now works as Blockchain Developer on Polkadot Blockchain (Rust, Typescript). ### Team Code Repos -- https://github.com/Supercolony-net +- [https://github.com/Supercolony-net](https://github.com/Supercolony-net) Please also provide the GitHub accounts of all team members. If they contain no activity, references to projects hosted elsewhere or live are also fine. -- https://github.com/xgreenx -- https://github.com/varex83 -- https://github.com/Artemka374 +- [https://github.com/xgreenx](https://github.com/xgreenx) +- [https://github.com/varex83](https://github.com/varex83) +- [https://github.com/Artemka374](https://github.com/Artemka374) ### Team LinkedIn Profiles (if available) -- https://www.linkedin.com/in/mivanichok/ -- https://www.linkedin.com/in/toma-sadova/ -- https://www.linkedin.com/in/bogdan-ogorodniy/ -- https://www.linkedin.com/in/artem-fomiuk-31249b226/ +- [https://www.linkedin.com/in/mivanichok/](https://www.linkedin.com/in/mivanichok/) +- [https://www.linkedin.com/in/toma-sadova/](https://www.linkedin.com/in/toma-sadova/) +- [https://www.linkedin.com/in/bogdan-ogorodniy/](https://www.linkedin.com/in/bogdan-ogorodniy/) +- [https://www.linkedin.com/in/artem-fomiuk-31249b226/](https://www.linkedin.com/in/artem-fomiuk-31249b226/) ## Development Status :open_book: [The project](https://github.com/Supercolony-net/typechain-polkadot) is already a work-in-progress. - ## Development Roadmap :nut_and_bolt: ### Overview -We have decided to describe a full roadmap of an Typechain here, with estimates. However, the funding we request at this stage is for milestones 2-3. -* **Total Estimated Duration:** 15 weeks -* **Full-Time Equivalent (FTE):** 2-2.5 -* **Total Costs:** 97 300 USD +We have decided to describe a full roadmap of a Typechain here, with estimates. However, the funding we request at this stage is for milestone 2. ## Previous work +### Milestone 1 - MVP, first application and testing. -#### Milestone 1 - MVP, first application and testing. - -* **Estimated duration:** 8 weeks -* **FTE:** 2 -* **Costs:** 44,800 USD +- **Estimated duration:** 8 weeks +- **FTE:** 2 +- **Costs:** 44,800 USD | Number | Deliverable | Specification | | ------ | ----------- | ------------- | -| 0a | License | MIT | -| 0b | Documentation | We will provide TypeScript code examples of this package in use (some can be already found [here](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#usage-examples)). As well, as inline documentation, JSDoc and its features description. | -| 1 | TS types | We will research & match types from ABI to TypeScript, compatible with [polkadot{.js} v8](https://polkadot.js.org) library. Separately, for methods' arguments and return values. Files with types definition will be generated. | -| 2 | Runtime code | Prepare output(its draft can be seen in [technical specification](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#generated-code-draft)) of runtime code with contracts' methods implementation. At this point we have minimal viable coverage of the ABI types, original methods' names, and general types for methods' options, without specifics for contract's [namespaces](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#namespaces). | +| 0a | License | MIT | +| 0b | Documentation | We will provide TypeScript code examples of this package in use, inline documentation, JSDoc, and the description of its features. | +| 1 | TS Types | We will research & match types from ABI to TypeScript, compatible with polkadot{.js} v8 library. Separately, for methods' arguments and return values. Files with types definition will be generated. | +| 2 | Runtime Code | Prepare output(its draft can be seen in [technical specification](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#generated-code-draft)) of runtime code with contracts' methods implementation. At this point we have minimal viable coverage of the ABI types, original methods' names, and general types for methods' options, without specifics for contract's namespaces. | 3 | Testing | Minimal coverage of PSP22 contract with integration tests. We will be testing correctness of the derived types of the arguments and return values. | -| 4 | NPM Packaging | Prepare the repository to work through CLI as a package. In TypeScript, as is, without translation to JavaScript. We will publish the package to [NPM repository](https://npmjs.com) and provide set-up instructions (i.e. for [installation](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#set-up), [input](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#input) & [output](https://github.com/Supercolony-net/typechain-polkadot/blob/master/docs/tech-specs.md#output)). | - +| 4 | NPM Packaging | Prepare the repository to work through CLI as a package. In TypeScript, as is, without translation to JavaScript. We will publish the package to NPM repository and provide set-up instructions (i.e. for installation, input & output). | ## Current work - Scope of this grant +### Milestone 2 - Full coverage for ABIs’ types. Contracts deployment. -#### Milestone 2 - Full coverage for ABIs’ types. Contracts deployment. - -* **Estimated duration:** 8 weeks -* **FTE:** 2 -* **Costs:** 44,800 USD +- **Estimated duration:** 11 weeks +- **FTE:** 2.5 +- **Costs:** 77,000 USD | Number | Deliverable | Specification | | ------ | ----------- | ------------- | | 0a | License | MIT | -| 0b | Documentation | We will cover new-added features in documentation and usage examples. | -| 1 | Investigation | Broaden types definitions for methods arguments and return values (to full coverage). | -| 2 | Parser & generators modules | Design and implement a new parser module for ABI JSON to work with different versions of the ABI. Parser's output structure serves as an input for generators. Refactor, replace inlne generation with parser to generator flow. | -| 3 | Contract deployment | Support of parsing `*.contract` files. Provide means for contract deployment. | -| 4 | Testing | Full coverage of PSP22 contract with integration tests. Both for contract usage and deployment. We will be testing arguments' & return values' types correctness. | -| 5 | Article | We will publish an article that explains features of Typechain, how to use it in projects| +| 0b | Documentation | Cover new-added features in documentation and usage examples. Prepare generated code to have more informative IDE hints based on TSDoc and the output type system (if needed). | +| 1 | Investigation & Refactoring | Broaden types definitions for methods arguments and return values (to full coverage). Also, refactor project structure to monorepo for future development | +| 2 | Parser & generators modules | Design and implement a new parser module for ABI JSON to work with different versions of the ABI. Parser's output structure serves as an input for generators. Refactor, replace inline generation with the parser to generator flow. | +| 3 | Contract deployment | Add availability to deploy contracts with `Constructors` field, using `*.contract` files. +| 4a | Contract classes extension | Extend generated contract classes with valuable properties ordinarily available on the contract (e.g., address, name, signer, etc.). Also, provide the ability to change signer and contract address easily without creating a new contract manually. | +| 4b | Methods' names | Format methods' names in the output from the original `MethodTrait::method_name` to a more user-friendly `methodName` naming scheme while resolving overlap in formatted names. | +| 5 | Testing | Complete coverage of PSP22 contract with integration tests. Both for contract usage and deployment. We will be testing arguments' & return values' types' correctness. | +| 6 | Article | We will publish an article that explains features of Typechain, how to use it in projects | +| 7 | Branding | Make logotype for typechain and better README | -#### Milestone 3 - Optimization. Improve type system of the generated code. +## Future work -* **Estimated duration:** 7 weeks -* **FTE:** 2.5 -* **Costs:** 52,500 USD +### Milestone 3 - High-level improvements, flexibility and simplifying of usage -| Number | Deliverable | Specification | -|--------| ----------- | ------------- | -| 0a | License | MIT | -| 0b | Documentation | We will cover new-added features in documentation and usage examples. | -| 1 | Precise methods definitions | Refine definitions and bahavior of contracts methods (i.e. methods' arguments and returns), depending on namespace, call options and properties of the method, like `payable` & `mutable`. E.g. preamptive querying for transaction calls, controlled by a call options flag. | -| 2 | Methods' names | Format methods' names in the output from original `MethodTrait::method_name` to more user-friendly `methodName` naming scheme, while resolving overlap in formatted names. | -| 3 | Contract classes extension | Extend generated contract classes with useful properties, normally available on the contract (e.g. address, name, signer, etc.). Rely on usage experience in doing so. | -| 4 | IDE hints | Prepare generated code to have more informattive IDE hints, based on both JSDoc and output typesystem itself (if needed). Rely on usage experience in doing so. | -| 5 | NPM Package | Translate package's code to JavaScript upon deployment. Provide informattive CLI, when needed. Make sure to have a cross-platform CLI support. | -| 6 | Typechain-compiler | Tool that will be easy-to-use for big projects to compile Rust code and then generate typechain definitions. | -| 7 | Article | We will publish an article that explains how to connect it to the project, describe the types of connection options (directly and through the compiler) | +- **Estimated duration:** 8-12 weeks +- **FTE:** ? +- **Costs: -** -## Future work -After this grant, we will be maintaining the project to keep up with new emerging ecosystem standards and also listen to issues from community and update the tool to make the process of transformation a nicer experience for the developers and teams. We are going to work on integration with Swanky project. +| Number | Deliverable | Specification | +| ------ | ----------- | ------------- | +| 0a | License | MIT | +| 0b | Documentation | We will cover new-added features in documentation and usage examples. | +| 1 | User-defined plugins | We will provide an opportunity for users to make their plugins, for instance, how to parse types or what generated code will look like. | +| 2 | Subscribing to events | We will research and subscribe to events the contract emits, which will be handy for developers. | +| 3 | Typechain-compiler | The tool will be easy for big projects to compile Rust code and generate Typechain definitions. It’ll be helpful for TDD when users can write code and develop everything in one CLI command instead of generating a typechain-code file by file. In plans, we want to make a wrapper for running user scripts (like hardhat run) and also functionality to initialize the environment for typechain usage | +| 4 | Openbrush integration | We will test typechain on openbrush integration tests to ensure everything is working correctly and is easy to use. | +| 5 | typechain/types package | We will make a separate package for types that typechain use to reduce the usage of the same code and separate static code from generated code. | +| 6 | Article | We will publish article that explain how to connect it to the project and describe the types of connection options (directly or via compiler) | -## Additional Information :heavy_plus_sign: +After this grant, we will maintain the project to keep up with new emerging ecosystem standards, listen to community issues, and update the tool to make the transformation process a more excellent experience for the developers and teams. We are going to work on integration with the Swanky project. -We haven’t applied for any other grant programs for this project. +## Additional Information :heavy_plus_sign: **How did you hear about the Grants Program?** Have a number of approved applications: + - OpenBrush - Sol2Ink - Typechain-polkadot (Milestone 1) From b278facd17798a35908e41c5ebc23737cce06985 Mon Sep 17 00:00:00 2001 From: Toma | SUPERCOLONY Date: Fri, 9 Sep 2022 09:16:34 +0200 Subject: [PATCH 6/6] Update typechain-polkadot-follow-up.md --- applications/typechain-polkadot-follow-up.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/typechain-polkadot-follow-up.md b/applications/typechain-polkadot-follow-up.md index 25a7b16d255..2edecfc9443 100644 --- a/applications/typechain-polkadot-follow-up.md +++ b/applications/typechain-polkadot-follow-up.md @@ -167,9 +167,9 @@ We have decided to describe a full roadmap of a Typechain here, with estimates. ### Milestone 2 - Full coverage for ABIs’ types. Contracts deployment. -- **Estimated duration:** 11 weeks +- **Estimated duration:** 7.5 weeks - **FTE:** 2.5 -- **Costs:** 77,000 USD +- **Costs:** 52,500 USD | Number | Deliverable | Specification | | ------ | ----------- | ------------- |