-
Notifications
You must be signed in to change notification settings - Fork 30
Update RWA #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update RWA #214
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| await expect( | ||
| fhevm.userDecryptEuint(FhevmType.euint64, frozenHandle, await token.getAddress(), agent1), | ||
| ).to.eventually.equal(50); // frozen is left unchanged | ||
| ).to.eventually.equal(25); // frozen is left unchanged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mixing frozen & unfrozen, here is an example of inconsistency:
openzeppelin-confidential-contracts/test/token/ERC7984/extensions/ERC7984Rwa.test.ts
Lines 404 to 406 in 7d0a1aa
| const encryptedFrozenValueInput = await fhevm | |
| .createEncryptedInput(await token.getAddress(), agent1.address) | |
| .add64(50) |
and:
openzeppelin-confidential-contracts/test/token/ERC7984/extensions/ERC7984Rwa.test.ts
Line 454 in 7d0a1aa
| ).to.eventually.equal(25); // frozen is left unchanged |
| await expect( | ||
| fhevm.userDecryptEuint(FhevmType.euint64, frozenHandle, await token.getAddress(), agent1), | ||
| ).to.eventually.equal(25); // frozen is left unchanged | ||
| ).to.eventually.equal(25); // is decreased by transfer amount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only 50 are frozen which means the other 50 are available. Those 50 available have nothing to deal with the 50 frozen ones and are instead free to circulate.
|
@james-toussaint following the discussion today, lets merge this if there are no other issues. We can follow up tomorrow and delete the unfreeze logic if necessary. |
* Init `ERC7984Rwa` extension. * Fix typos * Add agent role * Update spelling * Add pausable & roles tests * Add mint/burn/force/transfer tests * Remove tmp freezable * Name ERC7984Rwa * Name confidential * Move RWA test * Test with & without proof * Rwa mock uses freezable * Check transferred amounts in tests * Bypass hardhat fhevm behaviour * Add support interface test * Add should not force transfer if anyone * Move some modifiers to mock * Update doc * Swap items in doc * Add suggestions * Remove lint annotation * Update test name Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add restriction to ERC7984Rwa * Move gates * Remove ExpectedPause error * Rename block functions * Rename fixture * Force transfer with all update effects * Update set frozen doc * Refactor event checks in freezable tests * Use agent for operations * Natively bypass freezable and restricted extensions on force transfer * Expose single rwa interface * Fix force transfer receiver blocked test * Remove freezer check since internal parent * Add pre check and post hook on transfers * Add access control tests * Remove dup test * Improve pre update wording in freezable * Rename to preTransferCheck * Remove restricted interface * Check acl & order functions * Remove pre and post * More explicit wording * Remove freezer from mock and fix typo * Update RWA (#214) * Update RWA * fix lint * up * update comment * update tests * review feedback * up * Nit * inherit interface and inline selector calc * Lint import order * Precompute force transfer signatures --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
No description provided.