Skip to content

Clarify smart contract Pirc2 - #355

Open
Tsukimarf wants to merge 6 commits into
PiNetwork:mainfrom
Tsukimarf:main
Open

Tsukimarf wants to merge 6 commits into
PiNetwork:mainfrom
Tsukimarf:main

Conversation

@Tsukimarf

Copy link
Copy Markdown

Summary
This PR proposes revisions to the PiRC2 Subscription Contract API specification to improve clarity, consistency, and completeness of the smart contract definitions.
Changes

Updated and clarified smart contract spec sections for accuracy and readability
Improved descriptions of contract behaviors, parameters, and expected outputs
Ensured alignment between spec sections (data types, error codes, lifecycle methods)

Motivation
The existing PiRC2 spec contains areas where the contract behavior is ambiguous or underspecified, which could lead to inconsistent implementations by developers building on Pi Network. These changes aim to reduce ambiguity and make the spec easier to follow.
Related Sections

3-data-types
4-error-codes
5-constructor-and-service-management
6-subscription-lifecycle

Testing / Verification
Reviewed against the Soroban smart contract model and cross-referenced with existing PiRC2 sections for internal consistency.

@phuongnam467

Copy link
Copy Markdown

Tóm tắt Bản yêu cầu kéo này đề xuất sửa đổi đặc tả API Hợp đồng đăng ký PiRC2 để cải thiện tính rõ ràng, nhất quán và đầy đủ của các định nghĩa hợp đồng thông minh. Thay đổi

Cập nhật và làm rõ các phần đặc tả hợp đồng thông minh để đảm bảo độ chính xác và dễ đọc. Cải thiện mô tả về hành vi, tham số và kết quả mong đợi của hợp đồng. Đảm bảo sự nhất quán giữa các phần đặc tả (kiểu dữ liệu, mã lỗi, phương thức vòng đời).

Động lực: Đặc tả PiRC2 hiện tại chứa những khu vực mà hành vi của hợp đồng không rõ ràng hoặc chưa được xác định đầy đủ, điều này có thể dẫn đến việc triển khai không nhất quán bởi các nhà phát triển xây dựng trên Pi Network. Những thay đổi này nhằm mục đích giảm bớt sự mơ hồ và làm cho đặc tả dễ tuân theo hơn. Các phần liên quan

3-kiểu-dữ-liệu 4-mã-lỗi 5-quản-trị-hàm-tạo-và-dịch-vụ 6-vòng-đời-sống-của-đăng-ký

Kiểm thử/Xác minh: Đã xem xét dựa trên mô hình hợp đồng thông minh Soroban và đối chiếu với các phần hiện có của PiRC2 để đảm bảo tính nhất quán nội bộ.

@martinnjosh55-dev

Copy link
Copy Markdown

f3234598e881509fb8e0a6cebdac51e9cc593f86db835bdb4d0c81c778bb6500

@martinnjosh55-dev

Copy link
Copy Markdown

Martinnjosh55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants