Commit Graph

9 Commits

Author SHA1 Message Date
guibescos 178ad4cb0e
[pythnet-sdk] Bump borsh add borsh to MerklePriceUpdate (#1186)
* Add borsh

* Bump borsh

* Cleanup

* Try

* Cleanup

* Do it

* Add a test
2023-12-15 10:47:22 +07:00
Reisen 7c037ed6fb fix: avoid EnumAccess deserialization paths 2023-06-26 14:12:55 +01:00
Mohammad Amin Khashkhashi Moghaddam 955c81b1cc
Make AccumulatorUpdateData deserialization accept minor version bumps (#909)
* Make AccumulatorUpdateData deserialization accept minor version increases

* Add test for additional bytes at the end of the message
2023-06-23 14:04:05 +01:00
Mohammad Amin Khashkhashi Moghaddam 211bf02450
Implement accumulator updates for cosmwasm (#880)
* Implement accumulator updates for cosmwasm

* Update fee calculation logic for accumulator messages

The fee for accumulator messages is base fee times the number of messages
but the logic remains the same for the batch method
2023-06-13 12:59:29 +02:00
Mohammad Amin Khashkhashi Moghaddam 6014400205
Move message structures from pyth-client repo to pythnet-sdk (#867)
* Move message structures from pyth-client repo to pythnet-sdk

All rust based smart contracts could leverage these structures for deserializing
pyth messages. But having them in pyth-client makes all the smart contracts packages
depend on irrelevant packages such as solana libraries which caused dependency conflicts
With these structs moved here it would be easier to reuse them in other places

The custom (de)serialization logic remains in pyth-client since it was only to reduce binary size of the program deployed on mainnet/pythnet, therefore not necessary to be exposed here.

* Put arbitrary implementations behind quickcheck feature flag

* Expose magic variables and define them once
2023-06-12 19:34:08 +02:00
Ali Behjati 0330c9d387
[ci] Fix pre-commit (#863) 2023-06-08 09:45:14 +02:00
Mohammad Amin Khashkhashi Moghaddam f764fc8411
Bugfix for magic value check and additional serde test (#860) 2023-06-07 12:50:24 +02:00
Reisen 065fba29b1 feat: correct wire format definitions 2023-06-05 15:19:48 +01:00
Reisen af2d7b6e38 feat: add serializers for pyth formats 2023-05-31 16:20:49 +01:00