From 8678bd3de47b1883f1b1512a5bfab581153108ac Mon Sep 17 00:00:00 2001 From: Mike Casale <46603283+mikewcasale@users.noreply.github.com> Date: Fri, 29 Sep 2023 08:34:03 -0700 Subject: [PATCH] fixes broken POL test --- resources/NBTest/NBTest_033_Pools.ipynb | 96 ++++++++++++------------- resources/NBTest/NBTest_033_Pools.py | 2 +- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/resources/NBTest/NBTest_033_Pools.ipynb b/resources/NBTest/NBTest_033_Pools.ipynb index 7c340651e..2bcc299dc 100644 --- a/resources/NBTest/NBTest_033_Pools.ipynb +++ b/resources/NBTest/NBTest_033_Pools.ipynb @@ -6,8 +6,8 @@ "id": "6580a545", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.034785Z", - "start_time": "2023-09-18T11:40:57.609561Z" + "end_time": "2023-09-29T15:32:34.656653Z", + "start_time": "2023-09-29T15:32:33.634074Z" } }, "outputs": [ @@ -15,7 +15,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "ConstantProductCurve v3.1 (25/Aug/2023)\n", + "ConstantProductCurve v3.3 (21/Sep/2023)\n", "CarbonBot v3-b2.2 (20/June/2023)\n", "UniswapV2Pool v0.0.1 (2023-07-03)\n", "UniswapV3Pool v0.0.1 (2023-07-03)\n", @@ -60,8 +60,8 @@ "id": "14b3c378", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.037278Z", - "start_time": "2023-09-18T11:41:01.033932Z" + "end_time": "2023-09-29T15:32:34.656819Z", + "start_time": "2023-09-29T15:32:34.654801Z" } }, "outputs": [], @@ -84,8 +84,8 @@ "id": "4bf9ea77", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.039783Z", - "start_time": "2023-09-18T11:41:01.036744Z" + "end_time": "2023-09-29T15:32:34.661485Z", + "start_time": "2023-09-29T15:32:34.658406Z" } }, "outputs": [], @@ -98,9 +98,7 @@ { "cell_type": "markdown", "id": "5e07f1229048cd9c", - "metadata": { - "collapsed": false - }, + "metadata": {}, "source": [ "## test_bancor_v2_pool" ] @@ -110,10 +108,9 @@ "execution_count": 4, "id": "4dfe57c17c271eec", "metadata": { - "collapsed": false, "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.042227Z", - "start_time": "2023-09-18T11:41:01.040179Z" + "end_time": "2023-09-29T15:32:34.664765Z", + "start_time": "2023-09-29T15:32:34.662140Z" } }, "outputs": [], @@ -141,8 +138,8 @@ "id": "9d4692f5", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.045277Z", - "start_time": "2023-09-18T11:41:01.043826Z" + "end_time": "2023-09-29T15:32:34.668935Z", + "start_time": "2023-09-29T15:32:34.663794Z" } }, "outputs": [], @@ -166,8 +163,8 @@ "id": "cb1ac3fd", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.048040Z", - "start_time": "2023-09-18T11:41:01.046377Z" + "end_time": "2023-09-29T15:32:34.673916Z", + "start_time": "2023-09-29T15:32:34.668877Z" } }, "outputs": [], @@ -192,14 +189,23 @@ "id": "d69d49a3", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.053769Z", - "start_time": "2023-09-18T11:41:01.050776Z" + "end_time": "2023-09-29T15:32:34.687927Z", + "start_time": "2023-09-29T15:32:34.674043Z" } }, "outputs": [ { "data": { - "text/plain": "{'cid': '0x',\n 'fee': '0.000',\n 'fee_float': 0.0,\n 'exchange_name': 'bancor_v3',\n 'tkn0_balance': 2981332708522538339515032,\n 'tkn1_balance': 2981332708522538339515032,\n 'tkn0_symbol': 'tkn0',\n 'tkn1_symbol': 'tkn1'}" + "text/plain": [ + "{'cid': '0x',\n", + " 'fee': '0.000',\n", + " 'fee_float': 0.0,\n", + " 'exchange_name': 'bancor_v3',\n", + " 'tkn0_balance': 2981332708522538339515032,\n", + " 'tkn1_balance': 2981332708522538339515032,\n", + " 'tkn0_symbol': 'tkn0',\n", + " 'tkn1_symbol': 'tkn1'}" + ] }, "execution_count": 7, "metadata": {}, @@ -225,8 +231,8 @@ "id": "4e331537", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.082592Z", - "start_time": "2023-09-18T11:41:01.054836Z" + "end_time": "2023-09-29T15:32:34.688263Z", + "start_time": "2023-09-29T15:32:34.678092Z" } }, "outputs": [], @@ -266,8 +272,8 @@ "id": "6a9b1034", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.086790Z", - "start_time": "2023-09-18T11:41:01.059096Z" + "end_time": "2023-09-29T15:32:34.688310Z", + "start_time": "2023-09-29T15:32:34.682505Z" } }, "outputs": [], @@ -295,21 +301,17 @@ }, { "cell_type": "markdown", - "source": [], - "metadata": { - "collapsed": false - }, - "id": "b23eb1bda7161783" + "id": "b23eb1bda7161783", + "metadata": {}, + "source": [] }, { "cell_type": "markdown", + "id": "46617bc4b132b353", + "metadata": {}, "source": [ "## test_bancor_pol_token_traded_event" - ], - "metadata": { - "collapsed": false - }, - "id": "46617bc4b132b353" + ] }, { "cell_type": "code", @@ -317,8 +319,8 @@ "id": "fb389643", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:01.086880Z", - "start_time": "2023-09-18T11:41:01.061916Z" + "end_time": "2023-09-29T15:32:34.688684Z", + "start_time": "2023-09-29T15:32:34.686925Z" } }, "outputs": [], @@ -337,27 +339,25 @@ " 'tkn0_symbol': 'tkn0', \n", " 'tkn1_symbol': 'tkn1',}\n", ")\n", - "assert (bancor_pol_pool.state['tkn0_balance'] == 10)" + "assert (bancor_pol_pool.state['tkn0_balance'] == 10 + setup_data['bancor_pol_token_traded_event']['args']['amount'])" ] }, { "cell_type": "markdown", + "id": "6d14cfb18d534c28", + "metadata": {}, "source": [ "## test_bancor_pol_trading_enabled_event" - ], - "metadata": { - "collapsed": false - }, - "id": "6d14cfb18d534c28" + ] }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 11, "id": "afb5a056", "metadata": { "ExecuteTime": { - "end_time": "2023-09-18T11:41:45.060094Z", - "start_time": "2023-09-18T11:41:45.053325Z" + "end_time": "2023-09-29T15:32:34.694720Z", + "start_time": "2023-09-29T15:32:34.689949Z" } }, "outputs": [], @@ -382,9 +382,9 @@ "formats": "ipynb,py:light" }, "kernelspec": { - "name": "fastlane-bot-38", + "display_name": "fastlane-bot-38", "language": "python", - "display_name": "fastlane-bot-38" + "name": "fastlane-bot-38" }, "language_info": { "codemirror_mode": { @@ -396,7 +396,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.1" + "version": "3.8.17" } }, "nbformat": 4, diff --git a/resources/NBTest/NBTest_033_Pools.py b/resources/NBTest/NBTest_033_Pools.py index cda51f056..a6d467615 100644 --- a/resources/NBTest/NBTest_033_Pools.py +++ b/resources/NBTest/NBTest_033_Pools.py @@ -138,7 +138,7 @@ 'tkn0_symbol': 'tkn0', 'tkn1_symbol': 'tkn1',} ) -assert (bancor_pol_pool.state['tkn0_balance'] == 10) +assert (bancor_pol_pool.state['tkn0_balance'] == 10 + setup_data['bancor_pol_token_traded_event']['args']['amount']) # ## test_bancor_pol_trading_enabled_event