Skip to content

Native Rust SDK for smart contracts #461

@khssnv

Description

@khssnv

Hypothesis Statement

We believe that an additional abstraction layer over pallet-revive's API for smart contacts development;
Will result in significantly better the developer experience with native Rust smart contracts and enable broader adoption for dApps development;
As evidenced by developers choosing it more frequently over the lower-level API, indicating improved usability and trust in the abstraction.

Assumptions

  • Native Rust smart contracts are a meaningful addition to the current landscape alongside ink! and Solidity.

System Context

System Level: Module / Interface.
Component: Smart Contracts SDK abstraction over pallet-revive.
Architecture Layer: Business / Infrastructure.

Detailed Description

This experiment tests the impact of introducing an additional abstraction layer over the pallet-revive API to improve the developer experience when authoring native Rust smart contracts. The current API, while powerful, is low-level and closely tied to runtime implementation details, which imposes a steep learning curve and development overhead. By introducing a higher-level SDK or wrapper, we aim to provide more ergonomic interfaces, scaffolding utilities, and consistent patterns that align with typical Rust development workflows.

This layer is not intended to replace pallet-revive but to simplify its usage for smart contract authors who want to build in native Rust without engaging directly with the runtime-level APIs. The abstraction may include helper macros, error-handling patterns, project templates, and streamlined contract deployment/testing tools.

Technical Scope:

  • Simplified APIs and helper abstractions over the raw pallet-revive interface.
  • Developer-facing scaffolding tailored for Rust smart contracts.
  • Types and macro support for common patterns (e.g., event emission, state access).
  • Interfaces between the abstraction layer and the runtime module (pallet-revive).
  • (If applicable) CLI or scripting integration for contract operations such as compilation and deployment.

See also ADR #0013: Native Rust SDK for Smart Contracts #453.

Experimental Design

Setup Requirements

Environment:

  • Blockchain node with pallet-revive in the runtime.
  • Contracts compilation and deployment tools.

Data Requirements:

  • A set of example smart contracts implementing equivalent logic using the raw pallet-revive's interface and the new abstraction layer.
  • Developer feedback.

Tool Requirements:

  • Feedback collection.
  • Testnet metrics.

Sub-issues

Metadata

Metadata

Assignees

Labels

ConceivedDefinition planned

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions