This is copy from https://polkadot.polkassembly.io/post/157
Github: https://github.com/patractlabs/redspot
Homepage will be: https://redspot.patract.io
Patract Hub (https://patract.io) develops local open source toolkits and one-stop cloud smart IDE, committed to provide free development toolkits and infrastructure services for the entire smart contract ecosystem. Redspot's goal is to standardise the contract development process, hide the underlying compilation details of the contract, and combine the sandbox, library, API, SDK and other plugins to create a one-stop smooth contract development process.
Summary of Redspot’s Future Plan:
v0.1: Build core functions based on Truffle framework
v0.2: Migrate to Hardhat framework to enhance the extensibility of plugins and add some features to provide a smoother development workflow
- v0.3: Promote Redspot and allow more contract developers to participate. Combine the features of Substrate to add various plug-ins, such as Waffle, Jupiter, Gas report.
- v0.4: Provide Typescript type support for contracts (similar to Typechain), integrate multi-language SDK, etc.
We have finished the second proposal requirements for v0.2, and wrote a development report. This proposal will explain in detail the design details of Redspot v0.3. After ink! v3 was released last month, many developers began to pay attention to the development of the WASM contract. After the refactoring of v0.2, Redspot also has more powerful functions. We think now is the time to get help from Parity and W3F, and promote Redspot to the community. We hope to serve more developers and get their feedback to help us fix bugs and optimize Redspot.
We expect a major upgrade to the plugins system in the future. This upgrade is mainly to strengthen TypeScript support, simplify the introduction of plugins, and strengthen support for multiple contracts. We also plan to add more Redspot plugins:
Jupiter testnet plugin. Jupiter is a testnet we provide specifically for contract development. It has made some modifications to the pallet contract. We expect that after different chains integrate the pallet contract, there will be some customized modifications to the contract. Therefore, in the face of different chains with contract functions, Redspot will design plug-ins for the contract environment of this chain. The Jupiter test chain plugin will show how Redspot is compatible with different parachain contract development through plugins.
Gas report plugin v0.2. This plugin can print out gas consumption reports for all transactions of the contract.
Waffle's assertion library (https://ethereum-waffle.readthedocs.io/en/latest/matchers.html). It provides a lot of friendly matchers to make contract testing easier to write and read. Especially in polkadot.js, because all data is an object, testing is more difficult. You cannot directly judge expect(A).to.Be(B)
, you must judge expect(A.toHex()).to.Be(B.toHex())
like this. A custom matcher can simplify this step.
Detailed design of v0.3 (5 weeks,03 Nov ~ 8 Dec)
M1: Homepage and API docs page development ((1 designer + 3 developer) * 1 week)
- Develop https://redspot.patract.io, include logo design, UI design, UX design, and promotional materials.
- Establish Redspot's brand reputation and draft promotional copy.
- Technical selection of homepage and API documents, and development of front-end web pages.
- Write CI that automatically publishes API documents to ensure real-time updates of documents.
- Establish the i18n program, officially support Chinese and English, and accept translations from other languages in the community.
M2: Write detailed tutorials and documents (3 developers * 1 week)
- Add detailed comments to each externally provided function so that developers can get more detailed code hints when using TypeScript.
- Add a tutorial on how to use Redspot and a tutorial on how to write a plugin for Redspot.
- Add a page explaining the error code in detail. In the process of using Redspot, errors logs will link to this page.
- Add a Q&A page that lists the problems and solutions frequently encountered by developers.
- Write the plugins documentation.
M3: Upgrade Redspot's plugin system (3 developers * 1 week)
- Improve TypeScript support, so developers don't need to import the tsconfig.json file.
- Delete the usePlugin function, developers can automatically import the plug-in when imported/required.
- Better support for multi-contract projects, artifacts can generate nested directory structure.
- Improve the TypeScript type support of the plugin, so developers don't need to manually import type-extensions.d.ts.
- Develop CI, automated testing and release version.
- Specify version number and release process. Write a changelog to record the changes made during each upgrade.
M4: Develop Jupiter plugin and Gas Report v0.2 plugin (3 developers * 1 week)
- The Jupiter testnet is optimized for contract address generation. We will add the Jupiter plugin, which can add new contract APIs and change the way the internal address is generated. This plugin will be used as an example to show the compatibility and scalability of Redspot in supporting contracts on different chains.
- The previous version of Gas Report v0.1 will print Gas consumption when invoking transactions. In the new version of Gas Report, we will package it as a standalone plug-in. It can add a Task, which will print out the Gas consumption of all transactions in the current contract. It will also expand the test Task, and print out the Gas consumption of all transactions when the test is finished.
M5: Develop assertion library (3 developers * 1 week)
- Investigate existing matchers for contract testing on Ethereum and design matchers based on @redspot/patract.
- Implement the matcher.
- Implement a universal polkadot.js matcher.
Cost of v0.3 (1 designer * week + 15 developers * weeks)
- Operating activities: $3200 ( Rent and Devices: $200 per employee * week )
- Designer payments: $1000 ($1000 per designer * week)
- Developer payments: $28500($1900 per developer * week)
- —————————— +
- Total Cost: $32700
- Exchange Rate: $4.1 / New DOT
- Treasury Proposal: 7975 New DOT
How to verify: Official Website & Youtube demo & Github library
- View Redspot's homepage https://redspot.patract.io
- Check out the documents and tutorials we wrote
- Jupiter plugin
- Support unique settings on Jupiter
- Modify the address calculation method of Redspot's contract
- Gas Report plugin v0.2:
- A command to print gas consumption
- At the end of the test, print gas consumption
- Demonstrate the usage of assertion library
- Support
@redspot/patract
return value matching
- Support matching of values in polkadot.js