Commit Graph

388 Commits

Author SHA1 Message Date
PierreMkt
36c7e94e00 Merge branch 'refs/heads/main' into pm/eng-3406-add-swap-bytes-param 2024-08-05 10:44:55 -04:00
Alan Höng
4ae49ea207 Merge pull request #59 from propeller-heads/cz/usv2-integration-test
Fix USV2 integration test
2024-08-05 14:40:56 +02:00
czanella
1ab96ce292 Update other failing tests 2024-08-05 10:32:43 +01:00
czanella
30bd0c2a5c Fix some assertions in integration test
The foundation is:
marginal price > executed price > price after swap.

And this check is verified for multiple amounts
2024-08-03 10:54:25 +01:00
czanella
9411fc2b67 Discount fees from USV2 getPriceAt logic
add marginal price capability
2024-08-03 10:53:25 +01:00
PierreMkt
6f41147f91 feat(adapters): decode reduceFee bool from bytes data
TODO: apply reduce fee logic
2024-08-02 12:49:37 -04:00
PierreMkt
ec903734e0 test(adapters): Fix balancer getCapabilities test
returns HardLimits too
2024-08-02 12:00:54 -04:00
PierreMkt
034d5ac8c2 feat(adapters): Add new bytes parameter to swap
that allows arbitrary data to be passed
2024-08-02 11:55:00 -04:00
Alan Höng
75e8bdf96f Merge pull request #48 from propeller-heads/sdk/ENG-3338-add-third-party-pool
SDK V2: Add ThirdPartyPool for integration testing
2024-08-02 11:31:50 +02:00
Alan Höng
97f1d43e5b Merge pull request #54 from propeller-heads/ah/balancer-misc-updates
feat(balancer): Add update markers & rate providers
2024-08-02 11:01:02 +02:00
kayibal
ac279502c8 chore(balancer): formatting 2024-08-01 12:34:38 +02:00
kayibal
2e50eaf4ba feat(testing): Nicer cli; expose trace parameter
Nicer name for the cli args and expose the vm_traces flag to quickly enable/disable tracing.
2024-08-01 12:09:58 +02:00
kayibal
75b66a85af fix(balancer): Get all balancer tests working. 2024-08-01 12:03:01 +02:00
Florian Pellissier
a6cff51bf6 feat: SDK improvements
Add a way to pull stateless contracts code from node, add more settings to test_assets.yaml, add logic to allow dynamic stateless contract by calling another contract
2024-07-30 16:24:20 +01:00
kayibal
3fab5d6ea7 chore(testing): Move requirements.txt 2024-07-30 11:48:16 +01:00
kayibal
cc91ee27f6 chore(testing): Remove hard sell limit flag.
The setting is now inferred from the adapters capabilities.
2024-07-29 16:49:02 +01:00
kayibal
add412d712 fix(testing): Do not include balances with contracts.
Manually inserted contracts do not have balances attached to them so this would lead to 500 errors on the tycho side. With balances disabled, things work fine now.
2024-07-29 16:47:21 +01:00
kayibal
7beaf731bf fix(testing): Fix postgres volume.
The volume was not mapped to the correct directory and when it was, the bitnami container would have no access for writing into that directory. That was limiting since we could only write about 100MB which for some tests is not enough. Now we simply increase the SHM and do not use any mapping to sidestep the permission issues.
2024-07-29 16:46:23 +01:00
kayibal
8196d1c3a1 fix(balancer): Add bpt tokens to components.
The pools support swapping in and out of balancer lp positions out of the box. So including the bpt token will likely be useful in the future.
2024-07-29 16:44:38 +01:00
kayibal
ac22ed583f fix(balancer): Support ComposableStablePools on SwapAdapter.
Add support for CSP pools. The main issue here was that Limits for BPT tokens would be too high since the pool has the complete supply of the token preminted.

Not quite sure if the limit for buying the BPT token is set correctly but I guess you can try to buy the whole supply.
2024-07-29 15:25:30 +01:00
kayibal
bb25ee7f15 WIP: balancer tests 2024-07-25 21:05:48 +01:00
kayibal
4c337a36d1 feat(runner): Support initialized accounts + misc fixes.
Simplifies a lot the setup of testing:

- Looks up tycho-indexer under the usual paths no OS specific naming necessary.
- Simply assumes that protosim can be pulled from our private PyPi
- Navigates the foundry out folder to find solidity runtime binaries

Includes some additional fixes to deal with some attribtues that may have to be reflected to defibot later on.
2024-07-25 19:31:54 +01:00
kayibal
fcaae2f643 chore: Move runner app to separate package 2024-07-25 14:11:29 +01:00
kayibal
f5b4c54a99 chore: code formatting 2024-07-25 14:11:29 +01:00
kayibal
148fac276c feat(balancer): Add rate providers to static attributes.
Adds the rate providers and additional attributes to balancers static attributes. These will help in the future to migrate some of the components to use the DCI.

Adds a small attributes module to tycho-substreams to make json encoding a bit easier.
2024-07-25 14:11:29 +01:00
kayibal
2eb41d82f0 feat(tycho-substreams): Add builder for TransactionChanges.
This builder allows easier access to already changed contract addresses, and entity attributes while avoiding duplicated entries.

This is needed to implement the update markers on balancer substreams.
2024-07-25 14:11:29 +01:00
Alan Höng
80f6e3c1c8 Merge pull request #55 from propeller-heads/zz/some-sdk-fixes
Improve testing SDK
2024-07-25 14:10:11 +01:00
Florian Pellissier
ec435d6094 refactor: Several testing SDK improvements such as:
fix db reset, use latest wheel, print trace in case of failure and add logic to pull stateless contracts
2024-07-25 15:02:57 +02:00
Thales Lima
1ce64123b9 Add remaining Balancer tests 2024-07-23 15:32:52 +02:00
Thales Lima
52ec30442b Add more Balancer tests 2024-07-23 15:32:52 +02:00
Thales Lima
19bf222e8e Add Balancer test, move requests to RPC Client class 2024-07-23 15:32:52 +02:00
Thales Lima
3ccf0a8a1f Add skip balance check flag for testing module 2024-07-23 15:32:52 +02:00
Thales Lima
e0c1ba3b50 Make tycho_client a python package, small bugfixes 2024-07-23 15:32:52 +02:00
Thales Lima
13c1db8171 Rename tycho to tycho_client 2024-07-23 15:32:52 +02:00
Thales Lima
7229f1fca0 Remove unused methods from PoolState 2024-07-23 15:32:52 +02:00
Thales Lima
183868e536 Load Snapshot from RPC request 2024-07-23 15:32:52 +02:00
Thales Lima
5e6c7d4647 Add relative imports, small bugfixes 2024-07-23 15:32:52 +02:00
Thales Lima
c075fdb668 Optimize imports and return BlockProtocolChanges msg 2024-07-23 15:32:52 +02:00
Thales Lima
f6fba2805a Add ThirdPartyPoolState and necessary auxiliary code 2024-07-23 15:32:52 +02:00
Thales Lima
94d4ab568a Add Decoder 2024-07-23 15:32:52 +02:00
Thales Lima
27c5a7580b Load tokens from Tycho RPC 2024-07-23 15:32:52 +02:00
Thales Lima
6b98cee57c Add Tycho Stream Adapter 2024-07-23 15:32:52 +02:00
Thales Lima
ca80b08cf2 Create structure 2024-07-23 15:32:52 +02:00
Zizou
96f67362bf Merge pull request #37 from propeller-heads/zz/update-protobuf
Update protobuf and Balancer Substreams
2024-07-23 15:19:14 +02:00
Florian Pellissier
bd0a077917 refactor: Use new hybrid structs for Curve 2024-07-23 15:09:05 +02:00
Zizou
ead8e17082 Merge pull request #53 from propeller-heads/fp/fix-vm-indexing
fix(substreams): Fix storage changes indexing for DELEGATECALL
2024-07-22 10:25:14 +02:00
Florian Pellissier
1bd5e39956 feat: Add Balancer vault indexing 2024-07-22 03:48:47 +02:00
Florian Pellissier
a2e951aff3 refactor: make pool_id a static attribute 2024-07-22 03:48:47 +02:00
Florian Pellissier
47e6f08338 docs: add changelog 2024-07-22 03:48:47 +02:00
Florian Pellissier
84a3642f95 refactor: remove substreams logs 2024-07-22 03:48:47 +02:00