Skip to content

Conversation

@drsk0
Copy link
Contributor

@drsk0 drsk0 commented Jul 23, 2025

Purpose

Introduce touch kernel method.

Changes

  • Adds a touch kernel method
  • Implementation via a bsoTouchTokenAccount method
  • Tests

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

CLA acceptance

_Remove if not applicable.

By submitting the contribution I accept the terms and conditions of the
Contributor License Agreement v1.0

@drsk0
Copy link
Contributor Author

drsk0 commented Jul 23, 2025

I'm currently trying to test this with a local node and see whether it also resolves COR-1650 (empty deny list blocking transfer).

@drsk0
Copy link
Contributor Author

drsk0 commented Jul 23, 2025

Tested this locally and this works as expected. GetAccountInfo will show a zero balance of a token for an account where a state was previously set.

@drsk0
Copy link
Contributor Author

drsk0 commented Jul 23, 2025

I can also not reproduce COR-1650 with this change anymore. Transfers will work with empty deny lists for when only deny lists are enabled. Transfers will also work if allow and deny lists are enabled and the receiver is on the allow list and it's deny list is empty.

@drsk0 drsk0 requested a review from td202 July 23, 2025 15:55
drsk added 5 commits July 24, 2025 18:50
Adds definitions and implementation of the `touchTokenAccount` operation
in the token kernel and the block state operations.

The interface in the kernel is

```
touch :: PLTAccount m -> m Bool
```

The return value indicates whether the account already had a token
balance associated (False) or if a zero account balance was newly
created (True).
Added a new function `updateTokenAccountState` to Persistent/Account.hs
that deals with updating the token account state table. The function is
then used in Persistent/BlockState.hs abstractions for the persistent
account versions.
@iumur iumur changed the title Add touch kernel method COR-1651: Add touch kernel method Jul 28, 2025
drsk0 and others added 2 commits July 28, 2025 10:48
@drsk0 drsk0 merged commit c8cccda into plt Jul 28, 2025
3 checks passed
@drsk0 drsk0 deleted the cor_1651 branch July 28, 2025 09:53
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.

3 participants