661 Commits

Author SHA1 Message Date
Florian Pellissier
2f0b084cc6 refactor(curve): rename tests 2024-08-09 10:39:14 +02:00
Florian Pellissier
4d528ddab3 fix(curve): fix curve tests after SDKv2 update, also add a few missing tests 2024-08-09 10:39:14 +02:00
tvinagre
115e552f2f Merge pull request #57 from propeller-heads/tl/sdk-improvements
SDK Improvements
2024-08-08 17:58:36 -03:00
Thales Lima
5eea31db40 Rename adapter_handler to adapter_builder and move responsibilities 2024-08-08 17:58:20 -03:00
Thales Lima
c0382fefdf Add aftermath logs 2024-08-08 17:58:20 -03:00
Thales Lima
c4024b9849 Better error diff and colorize it 2024-08-08 17:58:20 -03:00
Florian Pellissier
139f7ac3f5 refactor(substreams-testing): Remove shallow functions, be more 🐍 2024-08-08 17:58:20 -03:00
Florian Pellissier
1f9fe8d583 refactor(substreams-testing): Use Pydantic validators, Hexbytes and improve description 2024-08-08 17:58:20 -03:00
Florian Pellissier
95efda0423 refactor(substreams-testing): Use Pydantic to deserialize test_assets.yaml 2024-08-08 17:58:20 -03:00
kayibal
09d266a810 fix: Update requirements.txt
Assume both protosim_py and tycho-client are available from pypi.
2024-08-08 17:58:20 -03:00
kayibal
e302bfb4a6 feat: Request only contracts of interest
Instead of requesting all contracts just get what is specified by the components.
2024-08-08 17:58:20 -03:00
kayibal
9f4503e2a9 fix: Misc fixes around byte encoding.
Also initialize TychoDB for each test case individually.
2024-08-08 17:58:20 -03:00
kayibal
9df366b29d fix(balancer): Change pool_id encoding to utf-8.
Since it is used to replace component_id, it should be a string as well.
2024-08-08 17:58:20 -03:00
Thales Lima
5238141771 Fix hexbytes comparison, fix attribute access 2024-08-08 17:58:20 -03:00
Thales Lima
cb6e997375 Add token_factory 2024-08-08 17:58:20 -03:00
Thales Lima
d0c248fcb6 Add build_snapshot_message method 2024-08-08 17:58:20 -03:00
Thales
d893ab264c Start using external modules 2024-08-08 17:58:20 -03:00
Thales Lima
8ea02613a2 Improve README, add foundry to docker, add handler to build targets 2024-08-08 17:58:20 -03:00
Thales
11619bf8be Add initialization-block to tycho runner, fix docker and improve docs 2024-08-08 17:58:20 -03:00
Pierre
67f10e777a Merge pull request #63 from propeller-heads/revert-58-pm/eng-3406-add-swap-bytes-param
Revert "ENG-3406: Add new bytes parameter to swap"
2024-08-08 22:27:06 +02:00
Pierre
b3e3672172 Revert "ENG-3406: Add new bytes parameter to swap" 2024-08-08 22:24:35 +02:00
Pierre
9ef9782451 Merge pull request #58 from propeller-heads/pm/eng-3406-add-swap-bytes-param
ENG-3406: Add new bytes parameter to swap
2024-08-05 20:16:55 +02:00
PierreMkt
07ca52b2ff chore(adapters): Address PR review
keep mock data as empty bytes
2024-08-05 13:56:28 -04:00
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