-
Notifications
You must be signed in to change notification settings - Fork 824
Add Confidential Transfers Module #1980
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
Merged
Merged
Conversation
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
* scaffolding for new module * keeper scaffolding * scaffold with types * go sum * comments pt1 * comments * drop prev580
* pending balance type * convert apply pending balance to a message type * close account type
* new types * add deposit to msgs * add import issues * revert evm/params to old state * withdraw with tests * small changes * refactor and add tests * comment
* Genesis draft * revert evm params * revert evm params -2 * working simple test * linting * addressing linter errors * remove creating address for now
* add genesis init/export tests * refactor store * confidential transfers queries * working draft test * more tests * refactor tests * all accounts query * formatting * add pagination to request/response * update implementation to use paginated response instead * formatting * remove redundant param * all accounts with denoms * clean up commented code * return GetAccount back to keeper * formatting
* new types * add deposit to msgs * add import issues * revert evm/params to old state * withdraw with tests * small changes * refactor and add tests * comment * refactor initialize type * types * non module account types * msg server methods with module accounts * tests scaffold * add msg server tests * codeql * test issues * test improvements * comments * todo * app
* basic cli and first draft command for ct module * add second command draft * draft of init account * close account update * lint errors
* update codec * cleanup and queryies * enable in module * add other query * fix bug * fix lint * add decryption query * cleanup * validate address * comments * rectify test failures * speed up withdraw test * make other tests slightly faster
* - fix ct account by address and denom REST query - update swagger * - regenerate with latest changes - set module version to 1
* - add sol init account * - precompile + basic tests * self-review tweaks * ct init account payload cli * caller should = the user address * add caller check for transfers * refactor address retrieval logic. Add more tests * support Sei addresses in transfer precompile * add tests for Sei addresses * update tests * self-review tweaks
* - add sol init account * - precompile + basic tests * deposit precompile * refactor test
* - add sol init account * - precompile + basic tests * deposit precompile * refactor test * use caller instead of from address * add amount field comment * few tweaks * roll back init-account changes * remove unintended changes * remove unintended changes - 2 * use caller in transfer * init account precompile integration test * deposit precompile integration test * transfer precompile integration test * self review
…nsfers Precompile (#2033) * apply precompile * add withdraw precompile as well * update with queries * update precompiles for sender * close account and integration tests * lint
* - add sol init account * - precompile + basic tests * Basic account precompile query code and test * unit tests * integration test
update error code for case when account already exists
* working draft * get to address from events * get conversion of EVM tx to Sei tx * rafactor CT precompile to expose calldata parsing methods * working draft * self review tweaks * fix formatting * Add few clarifying comments
c-03 missing resource dependencies
* L-09 Proto Serialization Failures * lint * change to post
L-02/05 update protos
* update range proof for msg server * bump upload artifacts * workflow * bump timeout to 15 mins * order of transfer proof validaiton * order * add range proof verification cost * bump up gas accordingly * test changes * remove remaining gas check * remaining gas
* add error to rpc response * check for response.error * add timeout to httpclient
* - consume more gas for CT operations - limit number of auditors to 5 * self review tweaks * - fix precompile test - formatting * remove redundant nil check * - move gas cost to params - add more max auditor list validations * - re-use helper method * - add missed gas consumption * - fix tests - propagate validation error message
* adding allowlist to transfer * tests for transfer with allow list * restrict withdrawals and deposits as well * - add acl mappings * - add block list dep mapping
* - add missing validations - require both supply and metadata on account init * - add negative amount check on withdrawals * - add bech32 check for auditor address * - add denom validation check * - add denom validation check - 2 * - more missed validations * - fix tests * - fix tests - 2 * fix gas in test
* check for denom exponent * base * whitelist params * tests * typo * tests * clarify
merge module with main
Comment on lines
+67
to
+86
for name, m := range newAbi.Methods { | ||
switch name { | ||
case DepositMethod: | ||
p.DepositID = m.ID | ||
case InitializeAccountMethod: | ||
p.InitializeAccountID = m.ID | ||
case ApplyPendingBalanceMethod: | ||
p.ApplyPendingBalanceID = m.ID | ||
case TransferMethod: | ||
p.TransferID = m.ID | ||
case TransferWithAuditorsMethod: | ||
p.TransferWithAuditorsID = m.ID | ||
case WithdrawMethod: | ||
p.WithdrawID = m.ID | ||
case CloseAccountMethod: | ||
p.CloseAccountID = m.ID | ||
case AccountMethod: | ||
p.AccountID = m.ID | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Iteration over map may be a possible source of non-determinism
dssei
approved these changes
Apr 4, 2025
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.
Describe your changes and provide context
This is the working branch for adding the Confidential Transfers module.
Testing performed to validate your change
Associated unit and integration tests have been added here.