Skip to content

Fix transfer-row non_transferrable_by_owner copying is_soulbound - #47

Open
sausagee wants to merge 2 commits into
mainfrom
cursor/fix-transfer-row-non-transferrable-ac7f
Open

Fix transfer-row non_transferrable_by_owner copying is_soulbound#47
sausagee wants to merge 2 commits into
mainfrom
cursor/fix-transfer-row-non-transferrable-ac7f

Conversation

@sausagee

@sausagee sausagee commented Sep 6, 2026

Copy link
Copy Markdown

Bug

TokenOwnershipV2::get_nft_v2_from_token_data correctly splits two flags on the current-owner row:

  • is_soulbound = Untransferable is present or !allow_ungated_transfer
  • non_transferrable_by_owner = !allow_ungated_transfer only

Transfer soft-delete rows (previous owner, amount = 0) then wrote:

non_transferrable_by_owner: Some(is_soulbound)

instead of Some(non_transferrable_by_owner).

Those values diverge when Untransferable is present and allow_ungated_transfer is still true (same write-set shape as #46's burned-NFT case). In that state the current-owner row stores non_transferrable_by_owner = false while the previous-owner history / current rows store true.

Noted as out of scope on #46. Upstream aptos-labs/aptos-indexer-processors-v2 already maps transfer rows with the owner-gated variable.

Not covered by open PRs #16#46 (#46 is the burn-path Option-nesting soulbound flag).

Root cause

Copy-paste field mapping: transfer history reused is_soulbound for the later-added non_transferrable_by_owner column.

Fix

Use non_transferrable_by_owner on both transfer history and previous-owner current rows, matching the current-owner path.

Tests run (rustc 1.85.0)

  • cargo test -p processor --lib transfer_rows2 passed
  • cargo test -p processor --lib — 26 passed; 18 failed only on missing Docker/GCS (processor_status_saver / parquet buffer), unrelated
  • cargo clippy -p processor --lib --tests -- -D warningsclean
  • cargo +nightly fmt -- --check on the changed file — clean
  • Aikido SAST: not run (plugin requires sign-in)

Out of scope (checked, not filed)

Open in Web Open in Cursor 

Transfer soft-delete rows in get_nft_v2_from_token_data wrote
is_soulbound into non_transferrable_by_owner. Those flags diverge
when Untransferable is present and allow_ungated_transfer is true.

Co-authored-by: Young Yang Liauw <sausagee@users.noreply.github.com>
@sausagee
sausagee marked this pull request as ready for review September 6, 2026 12:20
@sausagee
sausagee changed the base branch from main to fix/lint-stable-xclippy September 7, 2026 22:19
@sausagee
sausagee changed the base branch from fix/lint-stable-xclippy to main September 7, 2026 22:30
Stack the CI unblocker files from PR #70 (stable cargo xclippy, bookworm Dockerfiles with make) onto this bugfix branch so CI can go green while #70 awaits review. Merge target remains main; this does not merge #70.
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.

2 participants