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

[Example] Added the Knight token object example #8489

Merged
merged 1 commit into from
Jun 14, 2023
Merged

Conversation

junkil-park
Copy link
Contributor

Description

This module implements the knight token (non-fungible token) and the food tokens (fungible token). This module has the function to feed a knight token with food tokens to increase the knight's health point.

Test Plan

aptos move test

@junkil-park junkil-park requested review from xbtmatt and movekevin June 2, 2023 01:31
Copy link
Contributor

@movekevin movekevin left a comment

Choose a reason for hiding this comment

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

Looking really good! Just a few comments

@junkil-park junkil-park requested a review from banool June 6, 2023 22:02
@junkil-park junkil-park force-pushed the jpark/knight branch 3 times, most recently from c6ee4a2 to eb438b9 Compare June 7, 2023 08:57
// Gets `property_mutator_ref` to update the health point and condition in the property map.
let property_mutator_ref = &knight.property_mutator_ref;
// Updates the health point in the property map.
property_map::update_typed(property_mutator_ref, &string::utf8(HEALTH_POINT_PROPERTY_NAME), new_health_point);
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose behind duplicating the health value into a property map and in the HealthToken resource on the knight token object? I think I am missing the original context of doing it this way, so was just wondering

Copy link
Contributor Author

@junkil-park junkil-park Jun 13, 2023

Choose a reason for hiding this comment

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

It's duplicated in the property map so that the wallet recognizes and displays it as a property. Currently, only the entries in the property map appear in Petra, not the Move resources.

Copy link
Contributor

@banool banool left a comment

Choose a reason for hiding this comment

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

Besides @xbtmatt's comment, looks good to me!

This module implements the knight token (non-fungible token) and the food tokens (fungible token).
This module has the function to feed a knight token with food tokens to increase the knight's health point.
@junkil-park junkil-park enabled auto-merge (squash) June 14, 2023 09:07
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on 3bb45050972d428ad467d03b82571cc4d25c7ce9

performance benchmark : committed: 5716 txn/s, latency: 6901 ms, (p50: 4900 ms, p90: 14100 ms, p99: 26700 ms), latency samples: 2441013
Max round gap was 1 [limit 4] at version 846013. Max no progress secs was 3.765615 [limit 10] at version 1506105.
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3bb45050972d428ad467d03b82571cc4d25c7ce9

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3bb45050972d428ad467d03b82571cc4d25c7ce9 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : committed: 8674 txn/s, latency: 3855 ms, (p50: 3700 ms, p90: 5400 ms, p99: 6300 ms), latency samples: 294940
2. Upgrading first Validator to new version: 3bb45050972d428ad467d03b82571cc4d25c7ce9
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 4068 txn/s, latency: 7707 ms, (p50: 8500 ms, p90: 10000 ms, p99: 10400 ms), latency samples: 158680
3. Upgrading rest of first batch to new version: 3bb45050972d428ad467d03b82571cc4d25c7ce9
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 4797 txn/s, latency: 6712 ms, (p50: 6600 ms, p90: 9200 ms, p99: 9700 ms), latency samples: 177520
4. upgrading second batch to new version: 3bb45050972d428ad467d03b82571cc4d25c7ce9
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 6560 txn/s, latency: 4954 ms, (p50: 4600 ms, p90: 7300 ms, p99: 9300 ms), latency samples: 229620
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 3bb45050972d428ad467d03b82571cc4d25c7ce9 passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 3bb45050972d428ad467d03b82571cc4d25c7ce9

Compatibility test results for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 3bb45050972d428ad467d03b82571cc4d25c7ce9 (PR)
Upgrade the nodes to version: 3bb45050972d428ad467d03b82571cc4d25c7ce9
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 4822 txn/s, latency: 6630 ms, (p50: 6500 ms, p90: 9200 ms, p99: 17500 ms), latency samples: 183240
5. check swarm health
Compatibility test for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 3bb45050972d428ad467d03b82571cc4d25c7ce9 passed
Test Ok

@junkil-park junkil-park merged commit 21ac8bf into main Jun 14, 2023
@junkil-park junkil-park deleted the jpark/knight branch June 14, 2023 09:51
vusirikala pushed a commit that referenced this pull request Jun 21, 2023
This module implements the knight token (non-fungible token) and the food tokens (fungible token).
This module has the function to feed a knight token with food tokens to increase the knight's health point.
banool pushed a commit that referenced this pull request Jul 7, 2023
This module implements the knight token (non-fungible token) and the food tokens (fungible token).
This module has the function to feed a knight token with food tokens to increase the knight's health point.
xbtmatt pushed a commit to xbtmatt/aptos-core that referenced this pull request Jul 25, 2023
This module implements the knight token (non-fungible token) and the food tokens (fungible token).
This module has the function to feed a knight token with food tokens to increase the knight's health point.
xbtmatt pushed a commit to xbtmatt/aptos-core that referenced this pull request Jul 25, 2023
This module implements the knight token (non-fungible token) and the food tokens (fungible token).
This module has the function to feed a knight token with food tokens to increase the knight's health point.
gedigi pushed a commit that referenced this pull request Aug 2, 2023
This module implements the knight token (non-fungible token) and the food tokens (fungible token).
This module has the function to feed a knight token with food tokens to increase the knight's health point.
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.

4 participants