Skip to content

Fix deprecated publish_event in nft.rs #428

Description

@Levi-Ojukwu

Description:

The NFT module uses env.events().publish_event() which is deprecated in favor of env.events().publish(). The deprecated method may be removed in future Soroban SDK versions, which would break compilation.

There are three calls to fix:

  1. Line 101-107: mint_invoice_nftpublish_event for minting
  2. Line 152-157: transfer_invoice_nftpublish_event for transfers
  3. Line 195-199: burn_invoice_nftpublish_event for burning

The new format should use env.events().publish() with a tuple of topic symbols and a data struct, matching the pattern used elsewhere in the codebase (e.g., events.rs).

Why it matters: Deprecated API usage will break compilation when the SDK removes support.

Acceptance Criteria:

  • Replace all publish_event calls with publish in nft.rs
  • Update event format to match Soroban SDK convention
  • Ensure tests still pass
  • Remove any #[allow(deprecated)] annotations if present

Relevant Files: contracts/invoice_liquidity/src/nft.rs:100-200


Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions