Repository navigation
feat: early-lease event, jurisdiction rules, keeper TTL bump - #1686
Merged
yusuftomilola merged 2 commits intoOct 17, 2026
Merged
yusuftomilola merged 2 commits into
yusuftomilola merged 2 commits into
Conversation
Closes DistinctCodes#1492 Closes DistinctCodes#1493 Closes DistinctCodes#1495 - assetsup/lease: emit a distinct `lease_terminated_early` event when `return_leased_asset` runs before the lease's end date, so an early break is observable apart from a scheduled return (DistinctCodes#1492). - assetsup/transfer_restrictions: add jurisdiction rules. Addresses carry a recorded ISO country code and an asset can configure a `geographic_allowed` allow-list; `validate_transfer` rejects recipients whose jurisdiction is not allowed (or unrecorded) with `GeographicRestriction` (DistinctCodes#1493). - assetsup/tokenization + lib: add a permissionless, idempotent `bump_asset_ttl` keeper entrypoint that extends the TTL of a tokenized asset's entries, so an inactive-but-valid asset is not archived (DistinctCodes#1495). DistinctCodes#1494 is already handled on `main`: math.rs documents and tests its overflow-checked arithmetic, so no change is made.
|
@limxiy is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@limxiy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Implements limxiy's assigned issues for the assetsup contract.
Closes #1492 — Event on early lease termination
return_leased_assetnow emits a distinctlease_terminated_earlyevent whenthe asset is returned before the lease's
end_timestamp, instead of the genericlease_returned. Consumers can now tell a break from a scheduled return.Covered by two event tests (early return vs return at the end date).
Closes #1493 — Jurisdiction-based transfer restrictions
Adds dynamic jurisdiction rules.
set_address_jurisdictionrecords an address'sISO country code (self-authenticated),
set_geographic_restrictionsets anasset's allow-list, and
get_address_jurisdictionreads a record.validate_transfernow rejects a recipient whose jurisdiction is absent from anon-empty allow-list (or not recorded) with
GeographicRestriction. The staticrestriction path is unchanged when no allow-list is configured.
Closes #1495 — Automated TTL bump before expiry
Adds
bump_asset_ttl, a permissionless and idempotent keeper entrypoint thatextends the TTL of a tokenized asset's persistent entries (asset record, holders
list, metadata, and each holder's ownership record) plus the contract instance.
An off-chain job can call it ahead of expiry so inactive-but-still-valid assets
are not archived. It is exempt from the pause, since blocking it during an
incident is exactly when entries are at risk. Covered by survival and
rejection tests.
Closes #1494 — No change required
Already handled on
main:math.rsdocuments and tests its overflow-checkedarithmetic, so no code change is made.
Notes
contracts/EVENTS.mdupdated for the new entrypoints, event, andjurisdiction rule.