Aditya Arora
77db9ee53b
feat(target_chains/ethereum/sdk/solidity): add convertToUint method to the sdk ( #1390 )
...
* Moving convertToUint to utils
* pre-commit fix
* reversing OracleSwap example
* pre-commit]
* added test
* abi-gen
* Added solc to sdk
* resolved comments
2024-03-28 17:23:41 -04:00
Pavel Strakhov
cd543bcd6a
refactor(target_chains/ethereum): remove duplicated tests
2024-03-28 14:50:01 +00:00
Pavel Strakhov
7352256c63
refactor(target_chains/ethereum): remove price attestations from tests
2024-03-28 14:50:01 +00:00
Pavel Strakhov
d23f6c0d11
refactor(target_chains/ethereum): rename tests and vars in GasBenchmark
2024-03-28 14:50:01 +00:00
Pavel Strakhov
f4617b484a
refactor(target_chains/ethereum): rename attestations to messages in PythTest
2024-03-28 14:50:01 +00:00
Pavel Strakhov
8843d0f875
refactor(target_chains/ethereum): clean up unused batch update code
2024-03-28 14:50:01 +00:00
Pavel Strakhov
06965d38cc
refactor(target_chains/ethereum): move unused functions from Pyth to VerificationExperiments tests
2024-03-28 14:50:01 +00:00
Pavel Strakhov
a2db288210
refactor(target_chains/ethereum): remove legacy batch updates support from parsePriceFeedUpdates and getUpdateFee
2024-03-28 14:50:01 +00:00
Pavel Strakhov
8a70ca769b
refactor(target_chains/ethereum): remove legacy batch updates support from updatePriceFeeds
2024-03-28 14:50:01 +00:00
Dev Kalra
02e196e924
feat(entropy_contracts): don't call an address if it is an Eoa in reveal callback ( #1395 )
...
* don't call an address if it is an Eoa
* fix comment
* update comment
2024-03-28 14:12:36 +05:30
Dev Kalra
d821e01109
feat(entropy-v2): add provider parameter to entropy callback ( #1389 )
...
* add provider parameter to entropy callback
* order
* abis regen
* update version
2024-03-26 18:00:06 +05:30
Dev Kalra
e7bf47a18e
feat(entropy-v2): request with callback ( #1342 )
...
* request with callback
* address comments
* pre-commit
* compilation successful
* pre-commit
* add tests
* generate-abis
* pre-commit
* correct version
* address comments
* pre-commit
* remove unused
* add comments
* pre-commit
* gen abi
* naming consistency
* remove gas limit comment
* requestWithCallback comment
* remove unnecessary asserts
* pre commit
* update request with callback coment
* abis regen
* refactor as per feedback
* abi gen
* rename
* implement ientropyconsumer
* gen abi
* comment entropy consumer
* test fix
* add comment
* reintroduce blockhash
* add error for invalid reveal call
* use getEntropy in entropy consumer
* add test for requestAndRevealWithCallback
* pass through for entropy consumer
* pre commit fix
* abi gen
* address comments
* address feedback
* gen abis
* pre commit run
2024-03-12 01:58:57 +05:30
Dev Kalra
11c1fa7101
[executor/contract] add get methods and tests ( #1260 )
...
* add methods and tests
* add sequence check
2024-01-30 17:27:35 +05:30
Dev Kalra
658d7ca032
[entropy] set provider fee and uri ( #1230 )
...
* set provider fee and uri
* update comment
* pre commit
* abis gen
* update tests
2024-01-18 13:55:48 +05:30
Amin Moghaddam
d0ceb076d8
[evm] Persist price updates if more recent ( #1208 )
...
* Persist price info if it is more recent in parse functions
* Refactor setLatestPrice to include checks and event in a single place
* Add test cases
2024-01-09 10:30:20 +01:00
Dev Kalra
2d5e030149
[executor] call contract with value ( #1206 )
...
* call contract with value
* address feedback
2024-01-08 17:29:32 +05:30
Dev Kalra
220e06a62d
test owner upgradable ( #1207 )
2024-01-07 17:31:34 +05:30
Dev Kalra
1816838c8a
[executor] implement upgradability ( #1198 )
...
* get all test to work
* executor upgradable
* update comments
* address feedback
* fix tests
2024-01-04 15:59:29 +05:30
Dev Kalra
5d951ee755
[entropy] audit 4. users can influence the Entropy revealed result ( #1179 )
...
* add a check for blockhash
* add comment
* update test name
* comment update
* change block number
* change order for assertions
* pre commit run
* names and comments
2023-12-14 17:57:45 +05:30
Dev Kalra
f0c67c5996
[entropy] audit: 3. two step transfer ( #1178 )
...
* two step owner transfer
* admin two step transfer
* remove redundant test
2023-12-13 16:45:07 +05:30
Dev Kalra
941ee777f0
[entropy] audit - 2. lack of contract existence check ( #1177 )
...
* contract existence check
* better comment
2023-12-13 16:42:21 +05:30
Ali Behjati
bbd3d1add3
chore(target_chains/eth): revert solidity version
...
This change reverts the solidity version to 0.8.4 as the current version
troubles the Pyth price feeds contract deployment. Some tests are
changed to use the methods available in the older version.
Also, the Pyth contract version is updated. This is because we made a
change to the Governance structs (to add Stacks) that results in a new
bytecode.
2023-12-06 17:42:42 +03:30
Jayant Krishnamurthy
c592fd36ca
[fortuna] Add confirmation delay before responding ( #1161 )
...
* Update abi
* fix tests
* update contract
* fix fortuna
* test confirmation delay
* cleanup
* fix
* split the fields
* saturating sub
* rename
2023-12-04 10:25:00 +01:00
Jayant Krishnamurthy
0a2378e94c
[entropy] more executor tests ( #1162 )
2023-12-03 09:14:35 -08:00
Jayant Krishnamurthy
97bbc8cef9
add authorization for reveal method ( #1156 )
2023-11-30 13:28:00 -08:00
Dev Kalra
ae7610b0ab
[entropy] governance ( #1154 )
...
* governance
* correct comment
* add upgradability
* remove unused lib
* update governance and update logic
* change specifiers
* fix tests
* add tests
* rebase bug fixes
* change error name
* fix tests
* no need of UUPSProxy
* minimise the amount of code
* separate file for authorized tests
* add comment
* correct comment
2023-11-30 16:29:35 +05:30
Jayant Krishnamurthy
b2e4d56d36
[entropy] Entropy gas benchmarks and optimizations ( #1153 )
...
* add gas benchmark
* fix benchmark
* fix benchmark
* fix benchmark
* optimization 1: remove provider
* move to u128 for fees
* update benchmark
* comment
* reduce commitment storage
* optimize storage more
* fix fee fields in state
* hmm
* ok
* fix
* cleanup
* this got out of hand
* test overflow conditions
* fix bad merge
* doc
2023-11-29 14:37:42 -08:00
Jayant Krishnamurthy
a5646bf840
[entropy] Add a default provider ( #1150 )
...
* making a mess here
* add default provider
* cleanup
* test new abi
* add uri to fortuna
* pr comments
2023-11-27 18:40:36 -08:00
Jayant Krishnamurthy
b7a089b51e
[entropy] Change provider interface to simplify supporting many chains ( #1149 )
...
* grr
* cleanup
* fix semver
2023-11-27 07:39:54 -08:00
Jayant Krishnamurthy
da72b6e250
[entropy] First cut at EVM executor ( #1148 )
...
* executor
* executor tests
* basic test works
* cleanup
* cleanup
* fix ci
2023-11-27 06:45:43 -08:00
Jayant Krishnamurthy
fe7984d132
[entropy] Rename files ( #1127 )
...
* rename stuff
* fix
* fix
2023-10-31 08:50:15 -07:00
Jayant Krishnamurthy
727f9ec33d
Initial version of random numbers contract ( #1093 )
...
* initial merkle tree cut
* initial working test
* grrr
* add this deploy script
* contract stuff
* doc
* cleanup
* cleanup
* delete janky deploy script
* first commit of random2
* randomness
* format
* wtf
* wtf
* stuff
* cleanup
* minor
* add extra field
* pr comments
2023-10-17 13:07:47 -07:00
Amin Moghaddam
eb9526675c
[evm] parsePriceFeed with uniqueness validation ( #1089 )
...
* Implement uniqueness
* Add tests and update abi
* Fix MockPyth for the unique version
* Bump version
* Add gas benchmark functions
2023-10-13 14:15:42 +02:00
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
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
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
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
4072520006
[eth] Update accumulator deserialization ( #838 )
2023-05-24 16:05:17 +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
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
Jayant Krishnamurthy
bbe10ba553
[sdk] Move JS sdks into this repo ( #611 )
...
* move files to subdir and js sdk here
* update pointer
* fix move
* delete lib
* fix this
* gitignore
* aptos sdk
* gitignore
* terra js
* gitignore
* move price pusher
* add lib to gitignore
* move examples
* fix workflow
* gr
* contracts
* hm
* fix
* gr
* grrr
* fix dockerfile
* wtf
* fix
2023-02-22 13:44:42 -08:00