-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR does a few of things: - Adds `TRACE` logs to Tenderly API implementation (this was used to figure out how the `id` could be extracted from the Tenderly simulation response). - Parses the `id` field from the simulation result - Builds and logs the URL for the simulation if it was saved. ### Test Plan Run the orderbook - make sure to enable saving on trade simulations: ```shell cargo run -p orderbook -- --trade-simulator Tenderly --tenderly-save-successful-trade-simulations true ``` Then, issue a verified quote: ```shell curl -s http://localhost:8080/api/v1/quote -X POST -H 'content-type: application/json' --data '@-' <<JSON | jq { "from": "0xa03be496e67ec29bc62f01a428683d7f9c204930", "sellToken": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "buyToken": "0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB", "kind": "sell", "sellAmountBeforeFee": "100000000000000000000", "priceQuality": "verified" } JSON ``` Observe the log: ``` 2023-09-04T13:30:42.231Z DEBUG request{id="0"}: shared::code_simulation: saved simulation url=https://dashboard.tenderly.co/gp-v2/nick/simulator/00b00269-6b8a-46a2-a640-f8596f1f7302 ```
- Loading branch information
Nicholas Rodrigues Lordello
authored
Sep 4, 2023
1 parent
72daad2
commit 27fa754
Showing
4 changed files
with
66 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters