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

[release][aip-83][1.13] Add untransferable handling for FA and token #405

Merged
merged 4 commits into from
Jun 13, 2024

Conversation

bowenyang007
Copy link
Collaborator

@bowenyang007 bowenyang007 commented Jun 13, 2024

Summary

Handling this AIP https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-83.md

Basically if an object is created with Untransferable resource then it cannot be transferred by anyone including the creator/admin. This PR addresses 3 changes in the indexer

  1. Objects -> untransferrable got added
  2. Token ownerships v2 -> is_soulbound is true if we see this object. non_transferrable_by_owner is still the old logic (!object_core.allow_ungated_transfer)

Note, we're not doing anything on the fungible asset front since is_frozen is not affected and there's nothing on store level transferrability currently.

Backfill

Not actually required if upgrading on time. Otherwise, need to upgrade objects_processor, and token_v2_processor

  • Testnet: 1231301072
  • Mainnet: 979865558

Testing

Obj: https://explorer.aptoslabs.com/txn/1231307643?network=testnet
image

Token: https://explorer.aptoslabs.com/txn/1231310601?network=testnet
image

@bowenyang007 bowenyang007 requested review from rtso and yuunlimm June 13, 2024 06:42
@@ -31,6 +31,7 @@ pub struct Object {
pub guid_creation_num: BigDecimal,
pub allow_ungated_transfer: bool,
pub is_deleted: bool,
pub untransferrable: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: typo -> untransferable

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually neither is a word haha. i prefer 2 r's but idk 🤷

Copy link
Collaborator

@rtso rtso left a comment

Choose a reason for hiding this comment

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

LGTM, just undo the change for fungible asset is_frozen.

@bowenyang007 bowenyang007 enabled auto-merge (squash) June 13, 2024 20:27
@bowenyang007 bowenyang007 merged commit f7808ad into main Jun 13, 2024
6 of 7 checks passed
@bowenyang007 bowenyang007 deleted the untransferrable branch June 13, 2024 20:27
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