Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support list fields for object.move #3142

Merged
merged 33 commits into from
Jan 5, 2025

Conversation

lispking
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 4:24pm
test-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 4, 2025 4:24pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Jan 4, 2025 4:24pm

@lispking lispking changed the title feat: support list fields for object.move [WIP]feat: support list fields for object.move Dec 31, 2024
Copy link

vercel bot commented Jan 2, 2025

@jolestar is attempting to deploy a commit to the Rooch Team on Vercel.

A member of the Team first needs to authorize it.

@lispking lispking changed the title [WIP]feat: support list fields for object.move feat: support list fields for object.move Jan 2, 2025
Copy link
Contributor

@jolestar jolestar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要构造一个测试用例:

第一个交易写 fields,第二个交易写并且读 fields。

测试目标:

  1. 测试从 db 中加载的场景。
  2. 测试如果 RuntimeObject 的 fields 中混合了 fresh 和 cached fields 后的翻页。
  3. 同一个交易中,数据有变化的情况下,多次遍历的结果是否一致。

这种测试需要通过集成测试来实现,参看 https://github.com/rooch-network/rooch/blob/be131eef2bb313c19d45c84ac5832ba96fbdbb69/crates/rooch-framework-tests/tests/cases

moveos/moveos-object-runtime/src/runtime_object.rs Outdated Show resolved Hide resolved
moveos/moveos-object-runtime/src/runtime_object.rs Outdated Show resolved Hide resolved
frameworks/moveos-stdlib/sources/object.move Outdated Show resolved Hide resolved
frameworks/moveos-stdlib/sources/table.move Outdated Show resolved Hide resolved
frameworks/moveos-stdlib/sources/object.move Outdated Show resolved Hide resolved
frameworks/moveos-stdlib/sources/object.move Outdated Show resolved Hide resolved
frameworks/moveos-stdlib/sources/table.move Outdated Show resolved Hide resolved
frameworks/moveos-stdlib/sources/table.move Outdated Show resolved Hide resolved
@jolestar jolestar merged commit fe3e666 into rooch-network:main Jan 5, 2025
8 of 10 checks passed
@lispking lispking deleted the object-support-list branch January 5, 2025 14:37
jolestar added a commit that referenced this pull request Jan 8, 2025
* feat: support list fields for object.move

* fix UNKNOWN_INVARIANT_VIOLATION_ERROR

* rename list_fields to list_field_names

* fix native return types

* make code tidy

* make code tidy

* make code tidy

* support cursor and limit for list_field_keys

* update object list_field_keys gas handle and adjust fetch data from db

* make code tidy

* update native_list_field_keys default value to 0

* check is_empty that before add native_list_field_keys

* update is_empty for ListFieldsGasParametersOption

* fix review notes

* fix lint

* add list_field_keys for table and add rooch-framework-tests

* update ut assert value

* update list_field_keys of table notes

* add length ut for list_field_keys

* add more ut for list_field_keys

* make ut tidy

* add iterator for table

* fix next/next_mut for table issue

* update borrow_field_key_internal and borrow_mut_field_key_internal notes

* add How to test move contract? notes

* update borrow_field_key_internal and borrow_mut_field_key_internal notes

* update review notes

* update review notes

---------

Co-authored-by: jolestar <jolestar@gmail.com>
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