Patract is developing development tools and services for Polkadot’s Wasm contract technology. With the support of Polkadot Treasury, we have completed the development, report, and external review of Redspot, Europa, Elara, zkMega, Metis. However, in the past six to twelve months, the underlying technology of Wasm contracts led by Parity has undergone tremendous breaking changes, so we continued to contribute our developers for long-term maintenance. Among them, the function changes of Pallet-Contracts and ink! mainly include :
- Change of Pallet-contracts
- Refactors
- PR#9838 contracts: Refactor dispatchables
- PR#8604 contracts: Refactor the exec module
- PR#9669 remove rent contracts: Remove state rent
- update about host_func
- PR#10366 Stabilize "seal1" seal_call
- PR#9609 Contracts pallet - Add support for recovering public key from elliptic curve signatures (ECDSA)
- update about debug_message
- PR#9550 Stabilize seal_debug_message
- PR#9051 seal_debug_message not showing up in process output
- update about wasm executor
- PR#10173 Refactor sp-sandbox; make sure both sandbox executors are always tested
- PR#10268 Forward wasmer-sandbox feature to sp-sandbox
- PR#5920 Integrate Wasmer into Substrate sandbox environment
- Change of ink!
- PR#792 Implement seal_debug_message
- PR#914 Implemented ECDSA recover function.
- PR#903 Cleanup metadata codegen slightly
- PR#845 Update to scale-info 1.0, introduce metadata format versioning
- PR#665 Implement new trait definition codegen rocket
- PR#997 Use edition 2021
In addition, we paid a lot of cloud server and bandwidth costs for API service Elara, and maintained the Jupiter test chain. At the same time, we also provided the community with video and document developer education content, and continuously iterate the product line based on the community’s feedback. The following is a summary of the maintenance work and cost of each product in the past year:
Redspot (6 months)
Redspot is a Polkadot Wasm contract scaffold similar to Ethereum Hardhat. 6 months ago, we completed the development of version 0.4. After that, the maintenance work of the Github repo are as follows:
The main function updates are:
- Upgrade to support the latest ink! and polkadot-js.
- Support HDAccountsUserConfig
- Export buildTx function
- Fix the compilation error caused by the project name
- Updated the contract code of examples
- Fixed the bug of getting the wrong contract address
- Add the --release parameter when compiling the contract
- Support target_directory parameter when compiling contract
The maintenance costs are:
- 1 maintainer * monthly salary $1000 * duration 6 months = $6000
Europa (5 months)
Europa and Europa-UI is a running sandbox for Polkadot Wasm contract, similar to Ethereum Ganache. 5 months ago, we completed the development of version 0.3. After that, the maintenance work of the Github repo are as follows:
The main function updates are:
- Upgraded version to v0.3.6, basically compatible with the latest pallet-contracts.
- Release v0.3.1, Remove weight check in runtime, for some contract code in debug mode is too large.
- Release v0.3.2, adapted to refactored pallet-contracts
- Release v0.3.4, support stable seal_debug_message
- Release v0.3.5, change the rent parameters to zero, it will cause the same result compared with removed rent pallet-contracts.
- Release v0.3.6, support unstable seal_ecdsa_recovery
- Europa-ui follows Europa to make upgrades
- The Europa-ui upload contract part supports uploading .wasm files and .json files separately
The maintenance costs are:
- 1 maintainer * monthly salary $1000 * duration 5 months = $5000
Metis (4 months)
Metis is a Wasm contract standard library similar to Ethereum OpenZepplin. 4 months ago, we completed the development of version 0.1. After that, the maintenance work of the Github repo are as follows:
The main function updates are:
- Add receiver module for ERC721 and ERC1155
- Update to be compatible with the new version of ink!
The maintenance costs are:
- 1 maintainer * monthly salary $200 * duration 4 months = $800
Jupiter (12 months)
Jupiter is the Wasm contract test-chain provided by us. It is divided into two versions, independent chain and parachain. We didn't applied treasury proposals for this, but maintained by ourself. The maintenance work of the Github repo are as follows:
The main function updates are:
- Upgrade to the latest substrate
- Jupiter network supporting independent chain, sepc_version is changed from 1 to 4.
- Jupiter network supporting parachain (cumulus/polkadot-v0.9.8)
The maintenance costs is $3500:
- Cloud cost for independent chain Jupiter PoA:
- 2Core4G * monthly price $50 * duration 12 months = $600
- Cloud cost for Parachain Jupiter Para:
- 4Core8G * monthly price $100 * duration 5 months = $500
- Maintainer cost:
- 1 maintainer * monthly salary $200 * duration 12 months = $2400
Elara for Polkadot (12 months) and Statemint (1 month)
Elara is a node API service similar to Ethereum Infura. By building a middleware service layer, we can provide large number of users to visit by a small number of nodes. More than a year ago, we completed the development of version 0.2. After that, the main maintenance cost is from maintainer and cloud service.
maintenance cost ($38534) :
- 1 maintainer * monthly salary $500 * duration 12 months = $6000
- The total cost of Alibaba Cloud service in Singapore is $32534 (204969 CNY), the details are as follows:
- The unit price of each service is:
- Resources and costs actually consumed by each network:
- This is the screenshot of the Alibaba Cloud bill, the total cost is 805773 CNY, from which the Polkadot/Statemint services should be paid by the Polkadot Treasury are 204969 CNY, and the Kusama/Statemine/Westend/Westmint services should be paid by the Kusama Treasury are 434579 CNY, the rest are for other community chains.
- This is the screenshot of the Elara website statistics, total is 97352 GB / 6.06 Billion Requests, from which the traffic for Polkadot/Statemint is 18693 GB, for Kusama/Statemine/Westend/Westmint is 77572 GB, the rest are for other community chains.
Education (12 months)
In order to explain Patract's technical design and implementation details for the community members, Patract Labs currently recoreded 16 sessions of Chinese and English video courses, with a total duration of 19.6 hours / 1176 minutes.
PatraShare in Chinese
Patract Tutorial Series in English
Patract community activities in English
maintenance cost:
- 1 maintainer * monthly salary $500 * duration 12 months = $6000
Summary (2021)
Total is $59834 / Monthly avg price of DOT $33.8 = 1770 DOT