Commit Graph

98 Commits

Author SHA1 Message Date
Ali Behjati 11a0ba17d0
[eth] Deploy to gnosis mainnet (#892) 2023-06-15 20:58:39 +02:00
Jayant Krishnamurthy 25c1ac2c33
[xc-admin] Contract management tool (#885)
* cleanup

* blah

* gr

* stuff

* hm

* hmm

* wtf

* ah fix this

* ok finally it does something

* ok

* hrm

* hrm

* blah

* blah
2023-06-15 07:17:20 -07: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
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
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
Dev Kalra afecda7881
sei mainnet deployment (#851) 2023-05-30 13:11:03 +05:30
Daniel Chew 6cdcf4dffd
make cosmwasm deploy tools private (#850) 2023-05-29 21:25:42 +09: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
Dev Kalra c0956f8157
[cosmwasm] contracts test and updates (#839)
* contracts test and updates

* wormhole deployment

* sei contract details update
2023-05-26 14:24:40 +05:30
Ali Behjati 4072520006
[eth] Update accumulator deserialization (#838) 2023-05-24 16:05:17 +02:00
Dev Kalra 315fd413a8
[cosmwasm] osmosis mainnet deployment (#833)
* correct lable

* osmosis mainnet deploymnent
2023-05-24 17:39:23 +05:30
Jayant Krishnamurthy 01b54d2c58
Add PythErrors abi (#827)
* add error abis

* add to script too
2023-05-23 07:13:01 -07:00
Dev Kalra fbcb8a14f6
[cosmwasm] chain ids for pyth mainnet, pyth testnet stable, and pyth testnet edge feeds (#822)
* add chainids

* chain ids

* wormhole, instantiate, and test

* update chain structure

* update test script

* update chain id guidelines

* if brackets

* correct test arguments
2023-05-23 11:16:50 +05:30
Dev Kalra 3b03f9eddc
[cosmwasm] instantiate contracts on multiple chains (#799)
* instantiate contracts on multiple chains

* deploy to neurtron

* function not being used anymore

* rename file dir

* better logs

* wormhole guardian upgrade

* set default wormhole contract

* add all to stages to one file

* add extended chain config

* bug fix

* juno deployment

* removed unused parameter

* resolve bug add comments

* typo

* rename to vaa mainnet

* comment

* remove T

* hardcode checksum

* update download method comment

* update package-lock

* update package-json
2023-05-16 13:13:43 +05:30
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
optke3 b609b17fdf
[sui 7/x] - contract upgrades, version control (#762)
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* sui pyth

* update price feeds, dynamic object fields, Sui object PriceInfoObject

* register price info object with pyth state after creation

* sui governance

* some newlines

* error codes

* update and comment

* unit tests for pyth.move, add UpgradeCap to Pyth State (will be used for contract upgrades)

* updates

* test_get_update_fee test passes

* fix test_get_update_fee and test_update_price_feeds_corrupt_vaa

* test_update_price_feeds_invalid_data_source

* test_create_and_update_price_feeds

* test_create_and_update_price_feeds_success and test_create_and_update_price_feeds_price_info_object_not_found_failure

* test_update_cache

* update

* test_update_cache_old_update

* update_price_feeds_if_fresh

* comment

* contract upgrades start

* contract upgradeability

* update clock stuff

* edits

* use clone of sui/integration_v2 for stability

* make contract_upgrade::execute a public(friend) fun, remove clock arg

* E_INCORRECT_IDENTIFIER_LENGTH

* comment and edit

* add a single comment
2023-05-03 12:29:29 -04:00
Dev Kalra 079828f8ac
Wormhole stub (#789)
* add

* add sei to wormhole chains

* add wormhole code to the repo

* add lib to gitignore

* cosmwasm bug fix

* add tmp to gitignore

* no need for simulation

* add wormhole deployment stuff

* better comments

* resolve build errors

* trying a fix

* fix

* rename compiled code

* address feedback

* remove gitignore

* sei deployment

* complete sentences

* address comments
2023-05-03 20:48:00 +05:30
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
optke3 d8c69a63d0
[sui 6/x] - Pyth unit tests (#757)
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* sui pyth

* update price feeds, dynamic object fields, Sui object PriceInfoObject

* register price info object with pyth state after creation

* sui governance

* some newlines

* error codes

* update and comment

* unit tests for pyth.move, add UpgradeCap to Pyth State (will be used for contract upgrades)

* updates

* test_get_update_fee test passes

* fix test_get_update_fee and test_update_price_feeds_corrupt_vaa

* test_update_price_feeds_invalid_data_source

* test_create_and_update_price_feeds

* test_create_and_update_price_feeds_success and test_create_and_update_price_feeds_price_info_object_not_found_failure

* test_update_cache

* update

* test_update_cache_old_update

* update_price_feeds_if_fresh

* comment
2023-04-30 15:46:09 -04:00
optke3 f541ffa698
[sui 5/x] - Sui clock, error codes, fee computation (#740)
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* sui pyth

* update price feeds, dynamic object fields, Sui object PriceInfoObject

* register price info object with pyth state after creation

* sui governance

* some newlines

* error codes

* update and comment
2023-04-30 15:39:02 -04:00
optke3 2bbeb03ca9
[sui 4/x] - governance modules, update to sui `0.29.0` (#732)
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* sui pyth

* update price feeds, dynamic object fields, Sui object PriceInfoObject

* register price info object with pyth state after creation

* sui governance

* some newlines
2023-04-28 15:28:09 -04:00
guibescos 3e5600508b
Fix axios bug by downgrading, bump all dependents (#786) 2023-04-28 10:19:40 -05:00
Dev Kalra 259f0124f1
[cosmwasm] wormhole stub (#770)
* docker file to build wormhole contracts

* move to wormhole stub

* add comment

* update readme
2023-04-20 16:22:06 +05:30
Dev Kalra ec65d3ca81
[cosmwasm] osmosis release (#767)
* update contract version

* update script to build for osmosis

* update pyth sdk cw version

* update release pipeline

* fix pipeline
2023-04-17 18:25:09 +05:30
Dev Kalra 15060d6a5e
[cosmwasm] Osmosis multiple fee token support (#763)
* osmosis txfee supoort

* add get update fee for denom

* query for tx fee support

* add fee checker

* add comment

* implement osmosis code

* correct err response

* fix bugs

* cargo update

* disable rust feature

* return bool instead of result

* add wormhole comment

* tests added

* address feedback

* improve comments

* cargo update
2023-04-14 12:19:57 +05:30
Jayant Krishnamurthy 91dfc36e85
Move cosmwasm sdk into standard tree structure (#761)
* move cosmos sdk into standard tree structure

* fix typo

---------

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2023-04-13 12:27:34 -07: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
Dev Kalra 1371f18e84
add injective mainnet (#754) 2023-04-10 17:08:19 +05:30
Jayant Krishnamurthy 843a30c2c7
[solana] Add pre-commit for solana target chain contract (#753)
* precommit

* format
2023-04-09 19:38:29 -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
Dev Kalra 96c9e83e0f
[cosmwasm] Refactor deployer (#739)
* chain generic code

* pyth wrapper

* factory

* add calc fee and correct raw log

* add documentation

* rename method

* remove update fee  response

* add more documentation

* remove chain specific things

* minor tweak
2023-04-07 18:09:39 +05:30
Jayant Krishnamurthy c3b2322ac0
[solana receiver] Try solana signature verification builtin (#736)
* gr

* wtf

* wtf

* jfc

* jfc

* oh thank god

* make the test work

* cleanup

* cleanup
2023-04-05 10:44:45 -07: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
optke3 e4db9cac81
[sui 3/x]: events, dynamic fields, `update_price_feed`, `PriceInfoObject` (#714)
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* sui pyth

* update price feeds, dynamic object fields, Sui object PriceInfoObject

* register price info object with pyth state after creation

* PriceFeedUpdateEvent
2023-03-31 13:43:39 -05:00
Ali Behjati 111b0fa09f
[eth] Deploy to meter (#731)
* [eth] Deploy to meter testnet

* Add mainnet
2023-03-31 18:51:18 +02:00
optke3 55bc1b95bb
[sui 2/x]: `state`, `batch_price_attestation`, `set` (#710)
* state getters and setters, change Move.toml dependency to sui/integration_v2

* finish state.move

* add new line to pyth

* use deployer cap pattern for state module

* indent
2023-03-31 10:10:10 -05:00
Dev Kalra ccc2e33dee
update cleanup (#735) 2023-03-31 18:12:28 +05:30