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

[Non-EVM-1062] Solana Codec events support, Hookup Fuzz tests and cleanup Codec init #987

Merged
merged 8 commits into from
Dec 19, 2024

Conversation

ilija42
Copy link
Contributor

@ilija42 ilija42 commented Dec 19, 2024

Description

Requires Dependencies

Resolves Dependencies

@@ -25,6 +27,27 @@ func TestCodec(t *testing.T) {
tester := &codecInterfaceTester{}
RunCodecInterfaceTests(t, tester)
RunCodecInterfaceTests(t, looptestutils.WrapCodecTesterForLoop(tester))

t.Run("Events are encode-able and decode-able for a single item", func(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Events are encoded/decoded in the same way that accounts are. I only tested this one thing which confirms that the IDL event fields are properly parsed into Codec entries, all the encoding variations are already tested by the codec interface tests that are encoding/decoding accounts

@ilija42 ilija42 merged commit 546bddd into codec-interface Dec 19, 2024
32 checks passed
@ilija42 ilija42 deleted the NONEVM-1062-codec-events branch December 19, 2024 18:02
jadepark-dev added a commit that referenced this pull request Dec 19, 2024
* Connect codec interface tests and refactor codec to interface like EVM one

* progress

* Fully implement Codec interface tests

* Run codec tests in loop

* Prettify codec and codec tests

* Refactor codec nil encoding handling

* Revert accidental changes to testIDL.json

* Add sonar exclusion for codec test utils

* Add sq exclusion for duplications in testutils, add decoder unit tests

* Add encoder unit test

* Fix lint and rename codec to solanacodec to avoid types name collision

* Solana codec entry improvements

* Fix Solana codec field casing

* minor err messages improvements

* Code improvements

* Fix encoder unit tests

* Fix sonar exclusions

* lint

* Reorder methods in Solana codec

* Fix CR integration tests config

* Revert TestNewIDLCodec_WithModifiers deletion

* Add comments for codec entry includeDiscriminator option

* Add discriminator value check in codec entry Decode

* Reuse utils from interface tests for Solana codec interface tests

* Fix comment

* Fix comment

* [Non-EVM-1062] Solana Codec events support, Hookup Fuzz tests and cleanup Codec init (#987)

* Add events IDL parsing to codec

* temp

* Add a basic codec test for event IDL parsing

* Cleanup Solana Codec init

* Hookup Codec fuzz tests

* delete an unnecessary comment

* lint

---------

Co-authored-by: Jonghyeon Park <[email protected]>
dhaidashenko pushed a commit that referenced this pull request Dec 20, 2024
* Connect codec interface tests and refactor codec to interface like EVM one

* progress

* Fully implement Codec interface tests

* Run codec tests in loop

* Prettify codec and codec tests

* Refactor codec nil encoding handling

* Revert accidental changes to testIDL.json

* Add sonar exclusion for codec test utils

* Add sq exclusion for duplications in testutils, add decoder unit tests

* Add encoder unit test

* Fix lint and rename codec to solanacodec to avoid types name collision

* Solana codec entry improvements

* Fix Solana codec field casing

* minor err messages improvements

* Code improvements

* Fix encoder unit tests

* Fix sonar exclusions

* lint

* Reorder methods in Solana codec

* Fix CR integration tests config

* Revert TestNewIDLCodec_WithModifiers deletion

* Add comments for codec entry includeDiscriminator option

* Add discriminator value check in codec entry Decode

* Reuse utils from interface tests for Solana codec interface tests

* Fix comment

* Fix comment

* [Non-EVM-1062] Solana Codec events support, Hookup Fuzz tests and cleanup Codec init (#987)

* Add events IDL parsing to codec

* temp

* Add a basic codec test for event IDL parsing

* Cleanup Solana Codec init

* Hookup Codec fuzz tests

* delete an unnecessary comment

* lint

---------

Co-authored-by: Jonghyeon Park <[email protected]>
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.

1 participant