diff --git a/fastlane_bot/tests/nbtest/test_036_Manager.py b/fastlane_bot/tests/nbtest/test_036_Manager.py index 42d0d3571..3cf11ee09 100644 --- a/fastlane_bot/tests/nbtest/test_036_Manager.py +++ b/fastlane_bot/tests/nbtest/test_036_Manager.py @@ -104,7 +104,10 @@ def test_test_update_from_event_carbon_v1_update(): # ------------------------------------------------------------ # + + event_create_for_update = event_data['carbon_v1_event_create_for_update'] event = event_data['carbon_v1_event_update'] + + manager.update_from_event(event_create_for_update) assert event['args']['order0'][0] != [pool['y_0'] for pool in manager.pool_data if pool['cid'] == event['args']['id']][0] manager.update_from_event(event) diff --git a/resources/NBTest/NBTest_036_Manager.ipynb b/resources/NBTest/NBTest_036_Manager.ipynb index 68507c7f5..1bb959bbf 100644 --- a/resources/NBTest/NBTest_036_Manager.ipynb +++ b/resources/NBTest/NBTest_036_Manager.ipynb @@ -6,8 +6,8 @@ "id": "6b800d59", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:56.521013Z", - "start_time": "2023-07-13T04:47:56.487042Z" + "end_time": "2023-09-20T14:03:06.090221Z", + "start_time": "2023-09-20T14:03:02.984869Z" } }, "outputs": [ @@ -15,13 +15,13 @@ "name": "stdout", "output_type": "stream", "text": [ - "ConstantProductCurve v2.14 (23/May/2023)\n", + "ConstantProductCurve v3.2 (15/Sep/2023)\n", "CarbonBot v3-b2.2 (20/June/2023)\n", - "UniswapV2 v0.0.1 (2023-07-03)\n", - "UniswapV3 v0.0.1 (2023-07-03)\n", - "SushiswapV2 v0.0.1 (2023-07-03)\n", - "CarbonV1 v0.0.1 (2023-07-03)\n", - "BancorV3 v0.0.1 (2023-07-03)\n", + "UniswapV2 v0.0.2 (2023-08-27)\n", + "UniswapV3 v0.0.2 (2023-08-27)\n", + "SushiswapV2 v0.0.2 (2023-08-27)\n", + "CarbonV1 v0.0.2 (2023-08-27)\n", + "BancorV3 v0.0.2 (2023-08-27)\n", "imported m, np, pd, plt, os, sys, decimal; defined iseq, raises, require\n", "Version = 3-b2.2 [requirements >= 3.0 is met]\n" ] @@ -68,8 +68,8 @@ "id": "80ddef38", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:56.527256Z", - "start_time": "2023-07-13T04:47:56.493598Z" + "end_time": "2023-09-20T14:03:06.128079Z", + "start_time": "2023-09-20T14:03:06.090785Z" } }, "outputs": [], @@ -89,11 +89,24 @@ "id": "7919999a", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:57.071520Z", - "start_time": "2023-07-13T04:47:56.526210Z" + "end_time": "2023-09-20T14:03:08.151919Z", + "start_time": "2023-09-20T14:03:06.113589Z" } }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-20 07:03:06,113 [fastlane:INFO] - \n", + "2023-09-20 07:03:06,113 [fastlane:INFO] - **********************************************\n", + "2023-09-20 07:03:06,114 [fastlane:INFO] - The logging path is set to: logs/20230920-070306/bot.log\n", + "2023-09-20 07:03:06,114 [fastlane:INFO] - **********************************************\n", + "2023-09-20 07:03:06,114 [fastlane:INFO] - \n", + "2023-09-20 07:03:07,076 [fastlane:INFO] - Retrieved 169 carbon pairs from contract\n" + ] + } + ], "source": [ "\n", "# Create mock instances for all required parameters\n", @@ -117,8 +130,8 @@ "id": "584c8056", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:57.078106Z", - "start_time": "2023-07-13T04:47:57.076377Z" + "end_time": "2023-09-20T14:03:08.158339Z", + "start_time": "2023-09-20T14:03:08.156731Z" } }, "outputs": [], @@ -147,8 +160,8 @@ "id": "2baa6f73", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:57.084015Z", - "start_time": "2023-07-13T04:47:57.082263Z" + "end_time": "2023-09-20T14:03:08.164064Z", + "start_time": "2023-09-20T14:03:08.162595Z" } }, "outputs": [], @@ -183,13 +196,16 @@ "id": "71334cab", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:57.089037Z", - "start_time": "2023-07-13T04:47:57.086893Z" + "end_time": "2023-09-20T14:03:08.800682Z", + "start_time": "2023-09-20T14:03:08.166659Z" } }, "outputs": [], "source": [ + "event_create_for_update = event_data['carbon_v1_event_create_for_update']\n", "event = event_data['carbon_v1_event_update']\n", + "\n", + "manager.update_from_event(event_create_for_update)\n", "assert event['args']['order0'][0] != [pool['y_0'] for pool in manager.pool_data if pool['cid'] == event['args']['id']][0]\n", "\n", "manager.update_from_event(event)\n", @@ -211,8 +227,8 @@ "id": "71d67e1c", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:57.336085Z", - "start_time": "2023-07-13T04:47:57.092889Z" + "end_time": "2023-09-20T14:03:08.820959Z", + "start_time": "2023-09-20T14:03:08.805835Z" } }, "outputs": [], @@ -240,8 +256,8 @@ "id": "452029c9", "metadata": { "ExecuteTime": { - "end_time": "2023-07-13T04:47:57.572478Z", - "start_time": "2023-07-13T04:47:57.341059Z" + "end_time": "2023-09-20T14:03:08.838302Z", + "start_time": "2023-09-20T14:03:08.825262Z" } }, "outputs": [],