Repository navigation
Type token issuers as Address so malformed strings cannot be stored - #534
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #509
Summary
Addressinrecord_payment(Assetenum),Asset::Token, and the allowlist key so a garbage string cannot be allowlisted or written on-chain.Asset::Nativeinstead of an empty issuer field; reject"XLM"onAsset::Token.PaymentRecord/ history / allowlist entries fromStringissuer toAddress(chunked viaIssuerMigrationIncomplete, sequenced afterupgrade()). Dual-read uses rawVal+try_from_valso pre-V6 records do not trap.Address;InvoicePaymentRecordedstays schema 2 (compact). The TypeScript decoder still accepts schema 1 (string issuer, full payload) for the migration period.schema.json, ops scripts, Makefile, error manifest (IssuerMigrationIncomplete= 23), and the ABI drift check.Test
cargo test -p invoice-payment(includes malformed issuer, canonical Address allowlist key, native-with-no-issuer-field, V5→V6 rewrite)node soroban/scripts/check-client-drift.mjs— 23 errors, 18 methods matchschema.jsoncd soroban/client && npm test(afternpm install)./invoke-record-payment.shuses--asset Native/--asset '{"Token":["USDC","G..."]}'upgrade()→ repeatedupgrade_storage()untilstorage_schema_versionis 6 → unpause (runbook)Backend is intentionally unchanged in this PR.