From 473a1df35c0b35388a4ada3da170caa0561b4b79 Mon Sep 17 00:00:00 2001 From: ororopickpocket Date: Wed, 7 Apr 2021 18:50:18 +0000 Subject: [PATCH] extended v1 test on contract interaction script --- scripts/contractInteraction/contract_interaction.py | 12 +++++++++++- scripts/contractInteraction/testnet_contracts.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/contractInteraction/contract_interaction.py b/scripts/contractInteraction/contract_interaction.py index b493d3ad2..69e19ec0b 100644 --- a/scripts/contractInteraction/contract_interaction.py +++ b/scripts/contractInteraction/contract_interaction.py @@ -80,7 +80,7 @@ def main(): testV1Converter(contracts["ConverterSOV"], contracts["WRBTC"], contracts["SOV"]) # transferSOVtoTokenSender() # addLiquidityV1(contracts["WRBTCtoSOVConverter"], [contracts['WRBTC'], contracts['SOV']], [1 * 10**16, 67 * 10**18]) - addLiquidityV1UsingWrapper(contracts["WRBTCtoSOVConverter"], [contracts['WRBTC'], contracts['SOV']], [1 * 10**16, 67 * 10**18]) + #addLiquidityV1UsingWrapper(contracts["WRBTCtoSOVConverter"], [contracts['WRBTC'], contracts['SOV']], [1 * 10**16, 67 * 10**18]) def loadConfig(): global contracts, acct @@ -1120,6 +1120,16 @@ def testV1Converter(converterAddress, reserve1, reserve2): print('difference:', accountBalance - newAccountBalance) print('expected differnce:', bal2/100) + addLiquidityV1UsingWrapper(converterAddress, [reserve1, reserve2], [bal1/100, bal2/50]) + + newerAccountBalance = tokenContract2.balanceOf(acct) + print('difference:', newAccountBalance - newerAccountBalance) + print('expected differnce:', bal2/100) + + balanceOnProxy = tokenContract2.balanceOf(contracts['RBTCWrapperProxy']) + print('balance on proxy contract after the interaction: ', balanceOnProxy) + + def addLiquidityV1(converter, tokens, amounts): abiFile = open('./scripts/contractInteraction/LiquidityPoolV1Converter.json') abi = json.load(abiFile) diff --git a/scripts/contractInteraction/testnet_contracts.json b/scripts/contractInteraction/testnet_contracts.json index 02c2ba2fb..431207c5e 100644 --- a/scripts/contractInteraction/testnet_contracts.json +++ b/scripts/contractInteraction/testnet_contracts.json @@ -39,7 +39,7 @@ "VestingLogic": "0xc1cECAC06c7a5d5480F158043A150acf06e206cD", "OriginInvestorsClaim": "0x9FBe4Bf89521088F790a4dD2F3e495B4f0dA7F42", - "TokenSender": "0x4D1903BaAd894Fc6Ff70483d8518Db78F163F9ff" + "TokenSender": "0x4D1903BaAd894Fc6Ff70483d8518Db78F163F9ff", "WRBTCtoSOVConverter": "0x38729759415b27F70D5ca91CE357c45214B95Cf4", "RBTCWrapperProxy": "0xFFB9470e0B11aAC25a331D8E6Df557Db6c3c0c53"