Sale Djenic
20c1b83b7c
chore_: when returning errors, give precedence to custom (network) errors
2024-07-29 10:05:56 +02:00
Sale Djenic
9472e18315
fix_: setting best route only when we have it
2024-07-29 10:05:56 +02:00
Igor Sirotin
e76d93d340
chore: skip flaky tests ( #5606 )
...
* chore_: skip TestPeerCount
* chore_: skip flaky wallet tests
* chore_: skip flaky TestMemberReceivesPendingRequestToJoinAfterAfterGettingTokenMasterRole
2024-07-27 10:27:26 +01:00
belalshehab
03cb3ad0ab
fix(Wallet)_: Add quotes around token symbol in insufficient balance error messages to ensure valid JSON parsing
2024-07-26 13:16:23 +03:00
Igor Sirotin
870ede0829
fix_: tests ( #5585 )
...
* fix_: router tests errors sprintf
* chore_: skip flaky tests
2024-07-25 23:27:12 +01:00
saledjenic
2bbdb35f6c
Added improvements in resolving the best route ( #5569 )
...
* fix_: filtering out routes which do not match the amount in
* fix_: finding the best route logic updated
* fix_: "to" chains being used in sending bridge tx via hop are more explicit
Using `ChainIDTo` depicts better an intention which chain should be used.
* chore_: checking for required balance improved
An error contains now more details, for which token on which chain there is not enough balance for
executing a tx. Also check for required balance now calculates in fees for all tx that possibly can be
sent from the same chain.
2024-07-25 08:15:30 -04:00
Dario Gabriel Lipicar
7c4b43b4d9
feat(wallet)_: incorporate partner fees for L1 paraswap swaps
2024-07-23 15:27:43 -03:00
Sale Djenic
4d2d20cff4
fix_: allow sending 0 value transactions
2024-07-23 18:19:10 +02:00
Dario Gabriel Lipicar
afc6e7bcb9
feat(router)_: return processor error when no routes are found
2024-07-19 17:44:08 +02:00
Emil Sawicki
094d26dc66
fix_: Add pending tx for collectibles
2024-07-15 13:00:21 +01:00
Dario Gabriel Lipicar
21101c9444
feat(wallet)!: return routerV2 suggested routes whenever available, on top of error if the best route doesn't pass all checks
2024-07-12 17:59:41 -03:00
Sale Djenic
378e5741b9
feat_: the router - add candidates, as potential paths, by taking the max amount on enabled chains
2024-07-05 14:51:34 +02:00
Anthony Laibe
abb570dd3f
fix_: l1 fees at 0 and fix base fees sepolia
2024-07-05 11:04:29 +02:00
Ivan Belyakov
3983114ae5
test(wallet)_: add unit tests for balance fetcher
...
replace types with interfaces where necessary to allow mocking
implement fake eth scanner and erc20 contracts
2024-07-04 09:29:49 +02:00
Samuel Hawksby-Robinson
5f666e6ad9
test(router_validation)_: blended my validation with latest develop
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
3c1326be48
test(router_validation)_: Resolved invalid recursive type aliasing
...
Additionally I've resolved a panic when AmountIn and/or AmountOut is nil
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
59853fdbe2
test(router_validation)_: integrated the new errors into test loigc
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
e4420533d6
test(router_validation)_: removed error consts, see #5362
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
da2af02049
test(router_validation)_: Added test cases for Sticker and Swaps
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
cdaca322d0
test(router_validation)_: Added Error consts for all tested paths
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
79d0d08cfd
test(router_validation)_: Added full test cases for validateInputData
2024-07-03 11:47:04 +01:00
Samuel Hawksby-Robinson
f6f1b56cf7
test(router_validation)_: Added validation to prevent all excluded networks
2024-07-03 11:47:04 +01:00
Dario Gabriel Lipicar
4d7c2683f5
fix_: fix swap in routerV2
2024-07-01 15:07:17 +02:00
Sale Djenic
443cd412f7
feat_: the router returns route there is a balance on even that's not the cheapest route
...
If there are multiple routes across multiple networks, but the user doesn't have a positive balance
on the network which the router initially suggested as the best (cheapest) route, then we are not returning
an error saying there are not enough balance, but instead try to suggest the route on the network where
the user has a positive balance even that's not the cheapest route (it should be the second cheapest route,
but if there are not enough balance on it we proceed with the third cheapest route and so on...).
2024-07-01 15:07:17 +02:00
Sale Djenic
92361d9e20
feat_: new endpoint added for an async route/s calculation
...
- `GetSuggestedRoutesV2Async` calculates the route/s based on input parameters and sends
`wallet.suggested.routes` signal to notify a client.
2024-07-01 15:07:17 +02:00
Sale Djenic
1cdcc0dcc2
chore_: tests for router candidates added
2024-06-26 11:02:13 +01:00
Sale Djenic
68464d949c
chore_: calculating multi tx candidates improvements
...
- router logic splitted into two more logical functions
- locked amount validation improved
- hop and swap processors cached data kept per from/to chain and from/to token
- Clear function which clears the local cache is added
- process of evaluating `amountToSend` if more than a single network is locked is improved
- optimized params for require approval function
2024-06-26 11:02:13 +01:00
Sale Djenic
d1f8064437
chore_: typo in `disabledToChaindIDs` parameter name resolved
2024-06-26 11:02:13 +01:00
Sale Djenic
e272a0d465
chore_: unnecessary preferred chains input router parameters removed
2024-06-26 11:02:13 +01:00
Anthony
fb261e4a0e
feat_: change how we compute fees
2024-06-20 10:30:01 +02:00
Igor Sirotin
d2f4cae18f
fix: merge coverage reports from each test rerun ( #5360 )
...
* fix_: fix test coverage when rerunning tests
* fix_: make lint-fix
* chore_: change test coverage report artifact name
* chore_: added codeclimate.json to artifacts
* chore_: bring in gocovmerge util
---------
Co-authored-by: Siddarth Kumar <siddarthkay@gmail.com>
2024-06-19 11:40:52 +01:00
Dario Gabriel Lipicar
7b38a5b6bd
fix_: make use of slippage percentage parameter ( #15096 )
2024-06-17 09:51:29 -03:00
Sale Djenic
f54ed03e50
fix_: incorrect chain set for the destination chain when resolving candidates in router
2024-06-14 15:44:38 +02:00
Sale Djenic
07882d9259
fix_: router crash when packid is nil
2024-06-14 15:44:38 +02:00
Sale Djenic
462013520f
chore_: swap via paraswap improvements
2024-06-14 15:44:38 +02:00
Sale Djenic
9c3b49b866
chore_: celer bridge disabled, due to making correct routes using a single (hop) bridge
2024-06-14 15:44:38 +02:00
Sale Djenic
ddc75815eb
chore_: stickers buy added to the router
2024-06-11 19:46:43 +02:00
Sale Djenic
501b0a06c2
chore_: use the old name for backward compatibility
2024-06-11 10:30:34 +02:00
Sale Djenic
39a7d41135
chore_: making contract type param internal to hop bridge processor type
2024-06-10 16:38:38 +02:00
Sale Djenic
7fa6a68845
fix_: trying to figure correct hop bridge contract type if empty one is provided
2024-06-10 16:38:38 +02:00
Sale Djenic
07cf6cd52d
chore_: `Bridge` interface renamed to `PathProcessor` interface and necessary changes applied due to that change
2024-06-07 15:50:38 +02:00
Sale Djenic
fe21fd9e97
chore_: bridge moved to router
2024-06-07 15:50:38 +02:00
Sale Djenic
a5a83eb74e
chore_: ens set public key improvements
2024-06-07 13:15:40 +02:00
Sale Djenic
bb5545d430
chore_: ens release improvements
2024-06-06 11:51:14 +02:00
Sale Djenic
11f83780d1
chore_: ens register improvements
2024-06-05 14:45:46 +02:00
Sale Djenic
2149035619
chore_: rename from and to props of the PathV2 to from and to chain
2024-06-05 14:45:46 +02:00
Samuel Hawksby-Robinson
a3514e5d4d
test_: Implemented zap.Logger in debug for filter logging
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
92cd0c1411
test_: Replaced fmt.Printf with 'testing.T' 't.Logf'
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
9b256d1220
test_: Resolved insufficient rest test case issue
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
0d8068f5f4
test_: Addressed feedback from Sale
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
2d242e912f
test_: Fixes and additional test case for robustness
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
40193f4d1d
test_: Implemented some fixes to the filter logic
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
d42a09d638
test_: Added much better coverage for testing for filterNetworkComplianceV2
...
Note there are a number of failing test, this is fine. Need to figure out if these are caused by my tests, my code or the original algorithm
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
987c0b28ec
test_: Added much better coverage for testing for filterCapacityValidationV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
a648635d60
test_: Added much better coverage for testing for filterNetworkComplianceV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
4f2cd8ff7a
test_: Added testing for filterRoutesV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
a91ce6067d
test_: Added testing for filterCapacityValidationV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
3a50ce0397
test_: Added testing for filterNetworkComplianceV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
69125cd594
test_: Added testing for hasSufficientCapacityV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
e1f65fb531
test_: Added testing for isValidForNetworkComplianceV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
0f33076ceb
test_: added testing for TestCalculateTotalRestAmountV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
dd9e4e787c
test_: added testing for setupRouteValidationMapsV2
2024-05-28 22:05:57 +01:00
Samuel Hawksby-Robinson
889675e42a
test_: Modulised filterRoutesV2 to make more testible
...
This is as per my original draft earlier this week https://github.com/status-im/samyoul-notes/blob/master/analysis/wallet/Router/code/filterRoutes.go
2024-05-28 22:05:57 +01:00
Sale Djenic
74b1dfd694
fix_: hop contracts' addresses updated
2024-05-28 13:55:54 +02:00
Sale Djenic
c74931c333
fix_: hop bridge improvements
...
- handling `null` values in the Hop response
- using data returned from the Hop api when preparing data for estimation and calling `swapAndSend` and `sendToL2`
- estimating gas for bridges implemented in the bridges implementation types, avoiding wrong gas for placing bridge transactions
2024-05-28 13:55:54 +02:00
Sale Djenic
4a1a29b6a5
chore_: checks per sending type added (part3)
2024-05-18 00:00:23 +02:00
Sale Djenic
7a016d0859
chore_: router moved to router package (part2)
2024-05-18 00:00:23 +02:00