Skip to content
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

Fix amino registry for custom modules #1889

Merged
merged 5 commits into from
Oct 4, 2024
Merged

Fix amino registry for custom modules #1889

merged 5 commits into from
Oct 4, 2024

Conversation

udpatil
Copy link
Collaborator

@udpatil udpatil commented Oct 3, 2024

Describe your changes and provide context

This modifies the way the amino codec is used for custom modules to verify signatures. This will allow our custom modules to properly be amino signed and verified.

Testing performed to validate your change

Local chain testing

cdc.RegisterConcrete(&MsgCreateDenom{}, "tokenfactory/MsgCreateDenom", nil)
cdc.RegisterConcrete(&MsgMint{}, "tokenfactory/MsgMint", nil)
cdc.RegisterConcrete(&MsgBurn{}, "tokenfactory/MsgBurn", nil)
cdc.RegisterConcrete(&MsgChangeAdmin{}, "tokenfactory/MsgChangeAdmin", nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

We are missing tokenfactory/MsgUpdateDenom it seems

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

cdc.RegisterConcrete(&MsgSend{}, "evm/MsgSend", nil)
cdc.RegisterConcrete(&MsgRegisterPointer{}, "evm/MsgRegisterPointer", nil)
cdc.RegisterConcrete(&MsgAssociateContractAddress{}, "evm/MsgAssociateContractAddress", nil)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing MsgInternalEVMDelegateCall and MsgInternalEVMCall

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

internal calls can only come from smart contract calls like cosmwasm right? If so they can't be called this way, right? adding them here anyways but not sure if itll make a difference?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually, yeah I dont think we should include this since its not intended to be user facing

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

Attention: Patch coverage is 81.08108% with 7 lines in your changes missing coverage. Please review.

Project coverage is 61.34%. Comparing base (976cbaa) to head (2449cd6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
x/tokenfactory/types/codec.go 64.70% 6 Missing ⚠️
x/oracle/module.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1889      +/-   ##
==========================================
+ Coverage   61.28%   61.34%   +0.05%     
==========================================
  Files         263      263              
  Lines       23285    23310      +25     
==========================================
+ Hits        14271    14299      +28     
+ Misses       8006     8002       -4     
- Partials     1008     1009       +1     
Files with missing lines Coverage Δ
x/epoch/types/codec.go 66.66% <100.00%> (+66.66%) ⬆️
x/evm/keeper/msg_server.go 70.34% <ø> (-0.23%) ⬇️
x/evm/module.go 40.60% <100.00%> (+0.20%) ⬆️
x/evm/types/codec.go 56.09% <100.00%> (+4.09%) ⬆️
x/mint/types/codec.go 100.00% <100.00%> (ø)
x/oracle/keeper/test_utils.go 96.64% <100.00%> (ø)
x/oracle/types/codec.go 43.75% <100.00%> (+43.75%) ⬆️
x/oracle/module.go 2.22% <0.00%> (ø)
x/tokenfactory/types/codec.go 36.36% <64.70%> (+36.36%) ⬆️

... and 3 files with indirect coverage changes

@udpatil udpatil merged commit 4a64247 into main Oct 4, 2024
49 checks passed
@udpatil udpatil deleted the fix-sei-amino branch October 4, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants