Skip to content

Conversation

@heueristik
Copy link
Collaborator

@heueristik heueristik commented Sep 16, 2025

This PR introduces a transferAndLockCaller being stored as part of the implementation specific Locking.Data struct.

This change is made to prevent operational difficulties for exchanges receiving locked tokens and wrongly crediting users based on the Transfer event.

The transferAndLock function is intended to be used during the claim window period to distribute locked tokens.
After the claim window is over, no tokens will remain in the distributor (either because the balance is already0 or burnUnclaimedTokens() has been called). The transferAndLock function can then be considered as deprecated.

On an upgrade to a new implementation, the transferAndLockCaller will, by default, become the address(0) if the new implementation does not specify it otherwise.

@heueristik heueristik self-assigned this Sep 16, 2025
@heueristik heueristik added this to the Deployment milestone Sep 16, 2025
@heueristik heueristik changed the title feat: limit transferAndCall to be called by the distributor address feat: limit transferAndLock to be called by the distributor address Sep 16, 2025
@heueristik
Copy link
Collaborator Author

After this PR, the anoma/token-distributor dependency must be updated to reflect the change (see https://github.com/anoma/token-distributor/pull/77).

@heueristik heueristik changed the title feat: limit transferAndLock to be called by the distributor address feat: limit transferAndLock to only be callable by the distributor address Sep 16, 2025
@heueristik heueristik force-pushed the feature/ownable-lock-and-transfer branch from e72da4d to 8a1ff7f Compare September 16, 2025 16:08
@heueristik heueristik marked this pull request as draft September 16, 2025 16:14
agureev
agureev previously approved these changes Sep 16, 2025
cwgoes
cwgoes previously approved these changes Sep 16, 2025
Copy link

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@heueristik heueristik dismissed stale reviews from cwgoes and agureev via 8d93b92 September 18, 2025 09:28
@heueristik heueristik marked this pull request as ready for review September 18, 2025 09:30
@heueristik heueristik merged commit 524b139 into main Sep 18, 2025
1 check passed
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.

4 participants