Skip to content

feat(price-guard): bind NAV signature message to contract deployment and asset (#90) - #1144

Closed
jeffrey-graham wants to merge 1 commit into
DevTobis:mainfrom
jeffrey-graham:feat/bind-nav-signature-domain-90
Closed

jeffrey-graham wants to merge 1 commit into
DevTobis:mainfrom
jeffrey-graham:feat/bind-nav-signature-domain-90

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Closes #90

Summary

  • Updates build_nav_message in contracts/price-guard/src/lib.rs and canonicalNavMessage in services/price-guard/src/navSignature.ts to ballast-nav-v1:{contract}:{asset_code}:{ts}:{value} where {contract} is the 56-character StrKey C... of env.current_contract_address(), preventing cross-deployment and cross-network replay.
  • Binds asset_code one-to-one to asset: Address on-chain (DataKey::AssetCode(Address) / DataKey::CodeAsset(Bytes) + configure_asset_code), rejecting mismatched or cross-asset tickers.
  • Updates services/price-guard, golden test vectors, scripts/sign-nav.mjs, scripts/e2e-smoke.sh, and contracts/README.md, and adds unit tests verifying cross-contract and cross-asset replay rejection.

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.

Bind the NAV signature message to the asset and the contract deployment

1 participant