Commit Graph

72 Commits

Author SHA1 Message Date
Mohammad Amin Khashkhashi Moghaddam 741f763375
Fix mainnet values on fuji and chiado and remove oasis network (#979) 2023-07-25 11:31:45 +03:30
Ali Behjati e63490be48
[eth] Add EOS network (#963) 2023-07-18 23:00:47 +03:30
Ali Behjati dcec1e9328
[eth] Finalize accumulator contract (#960) 2023-07-18 12:57:29 +03:30
Mohammad Amin Khashkhashi Moghaddam 9bdc493ce6
Update evm chain and contract configs (#961)
Remove ropsten and shimmer_testnet network as they are deprecated
Provide neon rpc url as it is not private anymore
2023-07-18 10:36:26 +02:00
Mohammad Amin Khashkhashi Moghaddam 6f8fa11b20
Fix README.md for prettier (#959) 2023-07-17 16:42:03 +02:00
Ali Behjati c86e4f2610
[eth] Add linea (#956)
* [eth] Add linea

* Fix pre-commit
2023-07-17 17:51:22 +03:30
Mohammad Amin Khashkhashi Moghaddam c732fcf586
Abolish xc governance sdk (#957)
* Replace xc-governance-sdk with xc_admin_common package

xc_admin_package was not using the CHAIN overrides declared in the governance-sdk so it was moved
to that package as well

* Replace xc-governance-sdk with xc_admin_common in other packages

* Remove the package and all of its references

* Fix tests

* Fix bug in GovernanceDataSourceTransfer encoding

* Rename all references to the old package

* Redeploy neutron_testnet contract with new chain id

* Move SetWormholeAddress to separate file
2023-07-17 15:24:54 +02:00
Mohammad Amin Khashkhashi Moghaddam b64090aa75
Update README.md (#958) 2023-07-17 15:23:16 +02:00
Mohammad Amin Khashkhashi Moghaddam eddb789134
Restore accidentally removed file (#950) 2023-07-12 16:12:57 +02:00
Mohammad Amin Khashkhashi Moghaddam 66e5f186b2
Initial version of contract manager sdk (#943)
* Initial version of governance sdk

* Add more functionality to Sui contract manager and migrate variable naming to camelCase

* Refactor sui functions

* Add prettier

* Add SuiAuthorizeUpgradeContractInstruction for governance

* Update cosmwasm deploy tools entry point and expose some classes

* Remove console.logs from CosmWasm

* Refactor storage logic and add sui docs

* Use relative path for default path of store

* More documentation and minor fixes

* Rename package

* Add EVM classes

* Implement getters for data sources

* Use Google naming convention for abbreviations

More info here:
https://google.github.io/styleguide/tsguide.html#identifiers-abbreviations

* Change package license

* More comments and documentation

* Store code proxy function in CosmWasm
2023-07-12 15:50:24 +02:00
guibescos a77ee78d13
[eth] Deploy to mantle (#948)
* Deploy mantle

* Update pyth-evm-ks

* Update docs
2023-07-12 14:18:56 +01:00
Daniel Chew 8752291aa2
fix broken links (#945)
* fix broken links

* undo import order changes

* Fix more links

* Fix more broken links

* Fix more broken links

* Fix more broken links

* Fix precommit

---------

Co-authored-by: Thomaz Leite <thomaz@pyth.network>
Co-authored-by: Guillermo Bescos <g.bescos@yahoo.com>
2023-07-11 11:41:43 +01:00
Ali Behjati 2a4045504d
[eth] Add Linea goerli network (#947)
* [eth] Add Linea goerli network

* Add linea_testnet to eth/sdk/js
2023-07-11 11:15:22 +01:00
Ali Behjati bef4073b54
[price-service/client] Crash by default on WsError (#934)
* [price-service/client] Crash by default on WsError

* Update docker-compose files

* Update package versions again
2023-07-07 11:43:04 +03:30
swimricky ac97b4d35d
[eth] - Aave FallbackOracle Integration (#924)
* feat(eth): aave integration

Add IPriceOracleGetter and PythAssetRegistry mapping

* feat(eth): remove IPriceOracleGetter from PythAssetRegistryGetter

* refactor(eth): flatten PythAssetRegistySetter/Getter into PythAssetRegistry

* feat(eth): address feedback

move aave related contracts into separate directory, add explicit exponent/decimal handling, add
staleness check

* refactor(eth): minor rename to avoid shadowing

* fix(eth): handle exponent conversion and add tests

* chore(eth): remove unused console import

* feat(eth): address PR feedback

add more checks, tests & minor refactoring

* feat(eth): add more tests and address feedback
2023-07-06 08:29:08 -04:00
Ali Behjati aa0e6fdf22
[eth] Add WEMIX network (#940)
* [eth] Add WEMIX network

* Fix pre-commit

* Remove unnecessary change

* Fix prettier

---------

Co-authored-by: Guillermo Bescos <g.bescos@yahoo.com>
2023-07-05 18:15:43 +01:00
Ryu 5e44fa4c95
[price_service] js client: getPriceFeed() (#922)
* [price_service] js client: getPriceFeed()

* Fix pre-commit

* Bump package versions

---------

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2023-06-28 18:28:37 +02:00
Ali Behjati e39277dd9c
[eth] Add setWormholeAddress governance message (#917)
* [eth] Add setWormholeAddress governance message

* Address review feedbacks

* Add signatures to errors

This will help with debugging

* Update abi
2023-06-26 11:31:19 +02:00
swimricky 919f71e68f
[eth] - optimize ReceiverMessages parseAndVerifyVM (#901)
* feat(eth): optimize ReceiverMessages parseAndVerifyVM

* test(eth): update test setups to use wormholeReceiver

* chore(eth): remove console logging

* feat(eth): optimize & revert return type for parseAndVerifyVM

* fix(eth): add index boundary checks

* perf(eth): optimize verifySignature by passing in primitives instead of structs

* test(eth): add wormhole tests related to guardian set validity

* test(eth): add more parseAndVerify failure test cases

* test(eth): add more failure tests for parseAndVerify

* test(eth): add empty forge test, refactor/deduplicate
2023-06-22 14:11:54 -04:00
Mohammad Amin Khashkhashi Moghaddam c9c20310d3
Add slot variable in constructing fake wormhole payloads (#908)
The structure of the fake payload was not as expected.
Some tests were failing for the wrong reason but with the right error code.
Added one testcase to make sure the default behavior of the forging function
is correct.
2023-06-22 10:26:34 +01:00
Ali Behjati 11a0ba17d0
[eth] Deploy to gnosis mainnet (#892) 2023-06-15 20:58:39 +02:00
swimricky 44cd5fc42d
[eth] more update/parsePriceFeed optimizations (#886)
* perf(ethereum): optimize gas & bytesize by changing  some function parameters to use bytes memory

change parseWormholeMerkleHeaderNumUpdates & parsePriceFeedMessage to use bytes memory instead of
bytes calldata for function parameters

* perf(ethereum): more optimizations

use bytes memory for more functions, change parsePriceFeedMessage to use offset instead of copying a
slice

* [eth] Add unsafe calldata bytes lib (#888)

* Copy UnsafeBytesLib to UnsafeCalldataBytesLib

* [eth] Add UnsafeCalldataBytesLib and update code

---------

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2023-06-14 09:20:52 -04:00
swimricky bc338ccfb5
[eth]: add forward compatibility test for accumulator updateData (#884)
* test(ethereum): add forward compatibility test for accumulator data

* test(ethereum): fix typo and rename
2023-06-13 11:02:41 -07:00
swimricky 19b77e2c84
[ethereum] - charge updateFee per number of updates (#878)
* feat(ethereum): charge update fee per numUpdates for accumulator updates

* refactor(ethereum): refactor, add benchmarks for getUpdateFee

* refactor(ethereum): add back parseWormholeMerkleHeaderNumUpdates

* refactor: increment totalNumUdpates by 1 for batch prices

* test(ethereum): add test for checking getUpdateFee for accumulator, clean up unused code
2023-06-13 07:25:46 -07:00
Ali Behjati 183081cc20
Expose pythnet message buffer idls (#865) 2023-06-09 14:10:28 +02:00
swimricky 31e8d020cc
[eth] - optimize parse/updatePriceFeeds for gas & bytesize (#868)
* perf: optimize parse/updatePriceFeeds for gas & bytesize

* chore: cleanup

* refactor: renaming functions

* test: add benchmark tests for parse with wh merkle, clean up duplicate code
2023-06-08 13:49:21 -07:00
swimricky 9ddc7fdc7d
Ethereum/parse price feed updates accumulators (#855)
* feat(target-chains/ethereum): add accumulator support for parsePriceFeedUpdates

* feat(target-chains/ethereum): working impl & test of parsePriceFeedUpdates w/ accumulator data

* refactor(target-contracts/ethereum): refactor pyth accumulator

* refactor: remove console logs & imports

* refactor(target-chain/eth): refactor and more tests

* feat(target-chains/ethereum): address PR feedback

refactor, add parse revert tests

* chore: fix comment

* test(target-chains/ethereum): add/clean up tests

* test: add another test

* test: address more feedback
2023-06-07 12:44:47 -07:00
Ali Behjati bdc3fede24
[eth] Deploy to Kava (#859)
* [eth] Deploy to Kava

* [eth] Bump sdk/js package version

* [eth] Fix pre-commit
2023-06-07 15:29:03 +02:00
Jayant Krishnamurthy 925f606550
Fix oracle swap example and add docs (#856) 2023-06-03 07:39:00 -07:00
guibescos 11cb14ca76
Deploy neon (#854)
* Push

* Add config

* Sync up optimization for hardhat and truffle
2023-06-02 11:29:35 +01:00
Jayant Krishnamurthy 64bce66383
Choose unique VAA for query time if it exists (#853)
* hmm this way works but is complicated

* choose unique vaa

* update tests

* lint

* bump versions
2023-06-01 07:32:10 -07:00
Daniel Chew f99f23c416
update price service sdk (#849)
* update price service sdk

* bump version

* fix test

* include slot

* bump price-service-client version

* bump all that uses price-service-client

* bump all that uses price-service-client
2023-05-29 20:18:29 +09:00
Ali Behjati 4072520006
[eth] Update accumulator deserialization (#838) 2023-05-24 16:05:17 +02:00
Jayant Krishnamurthy 01b54d2c58
Add PythErrors abi (#827)
* add error abis

* add to script too
2023-05-23 07:13:01 -07:00
Ali Behjati 1dbc592836
[eth] Fix oracle-swap example frontend bugs (#813)
* [eth] Fix oracle-swap example frontend bugs

* [eth] Fix build warnings

* remove test

* add passWithNoTests to amm example

---------

Co-authored-by: Daniel Chew <cctdaniel@outlook.com>
2023-05-11 12:53:50 +02:00
guibescos 71bab7a9fd
[evm] Make comment match the function below (#804)
* Make comment match the function below

* Fix precommit
2023-05-05 12:49:14 -05:00
Ali Behjati 1d59e9052b
[tilt] Fix issues (#801) 2023-05-05 15:31:57 +02:00
Ali Behjati f94dceb1bc
[eth] Add Pyth Accumulator (#776)
This PR adds the support WormholeMerkle accumulator message to the ethereum contract while still supporting the old message format. The code is not optimized yet and with more optimizations we can achieve a better gas usage. Currently based on the gas benchmark below it has a 18% improvement with a single price feed. Although the cost of updating 5 feeds in the same batch is higher than the current approach but in reality the chances that all 5 feeds be in the same batch is very low.
2023-05-03 16:08:53 +02:00
guibescos 71632fa848
[docs] improve oracle amm (#791)
* Add address to Polygon clontract and cleanup

* Add url

* Typo

* Typo

* Improve writing

* Add comma

* Fix precommit

* Revert package-lock.json
2023-05-02 09:41:50 -05:00
guibescos 3e5600508b
Fix axios bug by downgrading, bump all dependents (#786) 2023-04-28 10:19:40 -05:00
Jayant Krishnamurthy c2484b1514
Gas usage experiments (#756)
* add gas usage experiments

* add proof verification

* extend existing contract

* update struct

* cleanup

* add threshold comparison

* ok this mostly works

* fix

* comment

* rename

* use rand utils
2023-04-11 07:07:45 -07:00
Ali Behjati 85b9c80e2a
[eth] Add Canto mainnet (#751)
* [eth] Add Canto mainnet

This deployment also enables contract rewards on canto. Since the
changed code is only specific to the Canto network and is used only
in initialization, only the diff is added as a file.

* Remove ds store

* Add some doc to deploying.md
2023-04-07 17:49:01 +02:00
Ali Behjati 71da520647
[eth] Deploy to Conflux eSpace (#748) 2023-04-07 16:23:20 +02:00
Ali Behjati 2db5a26752
[eth] Deploy to testnet Mantle (#742) 2023-04-04 13:34:32 +02:00
Ali Behjati 343091d788
[eth] Update ethereum js sdk readme (#738) 2023-04-04 10:04:12 +02:00
Ali Behjati 111b0fa09f
[eth] Deploy to meter (#731)
* [eth] Deploy to meter testnet

* Add mainnet
2023-03-31 18:51:18 +02:00
Cinque McFarlane-Blake 38a8c2831a
[evm] Deploy on Canto Testnet (#725)
* [evm] Deploy on Canto Testnet

* Redeploy

* Address feedbacks

---------

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2023-03-29 19:15:08 +02:00
Jayant Krishnamurthy 94f38fdd74
Fix JS workflow (#727) 2023-03-29 09:36:25 -07:00
Ali Behjati 272f11aac2
[eth] Redeploy shimmer testnet (#724) 2023-03-28 10:11:56 +02:00
Jayant Krishnamurthy 7dad38ea89
[evm] Deploy on Polygon ZkEVM mainnet (#723)
* [evm] Deploy on Polygon ZkEVM mainnet

* Trigger CI

* clippy

---------

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2023-03-27 08:18:09 -07:00