Skip to content

Commit 310b206

Browse files
committed
Context description
1 parent 69c53c8 commit 310b206

File tree

1 file changed

+25
-58
lines changed

1 file changed

+25
-58
lines changed

docs/ADR/0013-native-rust-sdk-for-smart-contracts.md

Lines changed: 25 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
# ADR Template
2-
3-
## ADR_[ADR_id]: [Descriptive title of the architectural decision]
4-
5-
*Note: This template maintains the Reader-focused design principle. Template sections can be completed out of order. Recommended sequence: Date → Status → People → Context → Consequences → Options → Decision. See ADR Guide for detailed working methods.*
1+
# ADR_0013: Native Rust SDK for smart contracts
62

73
## Date
84

9-
Decision date: YYYY-MM-DD
10-
Last status update: YYYY-MM-DD
5+
Decision date: YYYY-MM-DD.
6+
Last status update: 2025-07-23.
117

128
## Status
139

@@ -26,58 +22,41 @@ Last status update: YYYY-MM-DD
2622

2723
## People
2824

29-
### Author/Decision Owner (Single Point of Accountability)
30-
31-
[Name of person or team accountable for this decision and point of contact for questions]
25+
### Author/Decision Owner
3226

33-
- [Person 1]
34-
- [Person 2]
35-
- [Person 3]
27+
Alisher Khassanov, [@khssnv](https://github.com/khssnv).
3628

3729
### Consulted (Subject Matter Experts)
3830

39-
[List of people with relevant expertise who provided advice]
40-
41-
- [Person 1]
42-
- [Person 2]
43-
- [Person 3]
44-
45-
### Informed (Affected Parties)
46-
47-
[People/teams affected by this decision who should be aware]
31+
- Denis Pisarev, [@TriplEight](https://github.com/TriplEight).
32+
- Memechi Kekamoto, [@MemechiKekamoto](https://github.com/MemechiKekamoto).
4833

49-
- [ ] [Person 1]
50-
- [ ] [Person 2]
51-
- [ ] [Person 3]
34+
### Informed
5235

53-
*Note: People listed in "Informed" should submit a PR to check their name after reading this ADR. This can be done during the initial review process of the ADR upload/commit PR (when the file is first uploaded to GitHub and the author requests reviews), or in a separate PR after the ADR is merged.*
36+
- [ ] Alex Vyatkin, [@actinfer](https://github.com/actinfer).
37+
- [ ] Alexander Lygin, [@alexlygin](https://github.com/AlexLgn).
38+
- [ ] Sviatoslav Alekseev, [@zotho](https://github.com/zotho).
5439

5540
## Decision
5641

57-
[Briefly describe the decision made in "We will..." format. This section should be concise - it's a declaration of intent for implementers. Detailed reasoning belongs in other sections.]
42+
We will develop a native Rust SDK for PolkaVM and Revive project smart contracts, focusing on delivering a developer-friendly and ergonomic API.
5843

5944
## Context
6045

61-
[Describe the situation that calls for a decision. Focus on forces, constraints, and circumstances that led to needing this decision. Answer "What is the problem?" not "What's the solution?" Include:
46+
- The official Polkadot documentation, <https://docs.polkadot.com/develop/smart-contracts/>, offers ink! as the Rust option for smart contracts development. The other option offered is Solidity.
6247

63-
- Technical, business, and organizational context
64-
- Applicable requirements (functional and cross-functional)
65-
- Current state and why change is needed
66-
- Key stakeholders and their concerns]
48+
- Native Rust smart contracts for PolkaVM exist only as test fixtures within the Polkadot SDK, see <https://github.com/paritytech/polkadot-sdk/tree/7a747ff/substrate/frame/revive/fixtures/contracts>.
6749

68-
### Decision Criteria (Optional)
50+
- The QF Network's `qf-polkavm-sdk` project has a minimal set of abstractions, example contracts, and a CLI tool for deploying and invoking smart contracts, see <https://github.com/QuantumFusion-network/qf-polkavm-sdk/tree/850e169/>.
6951

70-
[Explicit criteria for evaluating options, such as:
52+
## Problem
7153

72-
- Performance requirements
73-
- Cost constraints
74-
- Security requirements
75-
- Maintainability needs
76-
- Time-to-market considerations]
54+
Developing native Rust smart contracts currently faces several challenges due to limitations in the platform's public API.
7755

78-
## Problem (Optional)
79-
80-
[Clearly state the problem being addressed. What issue or opportunity requires this architectural decision?]
56+
- Leaky abstractions. Smart contracts must directly interact with both PolkaVM and `pallet-revive` entities, exposing internal implementation details.
57+
- Excessive boilerplate. Developers need to repeatedly write similar code across different contracts.
58+
- Insufficient separation of concerns. Smart contract authors are required to handle low-level operations, rather than focusing solely on business logic.
59+
- Non-ergonomic API.
8160

8261
## Decision in Details (Optional)
8362

@@ -88,24 +67,14 @@ Last status update: YYYY-MM-DD
8867
- Timeline considerations
8968
- Who is responsible for implementation]
9069

91-
### Decision Drivers (Optional)
70+
### Decision Drivers
9271

93-
- [Driver 1: Key force or requirement influencing the decision]
94-
- [Driver 2: Another key consideration]
95-
- [...]
72+
- Why are we doing this?
73+
- Why ink! isn't a sufficient replacement for Rust? What's the niche for native Rust smart contracts?
9674

9775
## Options
9876

99-
[Briefly list the considered options. Each option is numbered for easy reference, with the selected option marked clearly as `(SELECTED)`. Aim for 3-5 options minimum. Always include at least "do nothing" option. A detailed description of each option can be written in the Consequences section below.]
100-
101-
1. (SELECTED) [Name of selected option]
102-
2. [Name of alternative option]
103-
3. [Name of alternative option]
104-
4. [Do nothing / Status quo option]
105-
106-
## Consequences (Optional)
107-
108-
### Option 1: [Name of option] (SELECTED)
77+
### Option 1: Native Rust SDK for smart contracts
10978

11079
[Brief description of this option.]
11180

@@ -143,8 +112,6 @@ Last status update: YYYY-MM-DD
143112
- [Potential benefit 1 we're giving up]
144113
- [Potential benefit 2 we're giving up]
145114

146-
*(Repeat for additional options if applicable)*
147-
148115
## Implementation Notes (Optional)
149116

150117
[Any specific guidance for implementing this decision, including:

0 commit comments

Comments
 (0)