From 5db25f5e8680477bb279b4d82d38d6650d67ada3 Mon Sep 17 00:00:00 2001 From: 8baller Date: Tue, 10 Oct 2023 00:25:51 +0100 Subject: [PATCH 1/4] bumped to web3v6 --- multicaller/multicaller.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multicaller/multicaller.py b/multicaller/multicaller.py index c37ef84..eb71a6d 100644 --- a/multicaller/multicaller.py +++ b/multicaller/multicaller.py @@ -39,7 +39,7 @@ def loadMultiCall(self): abiPath = os.path.join(path); f = pkgutil.get_data(__name__, abiPath).decode(); abi = json.loads(f); - multiCall = self.web3.eth.contract(self.web3.toChecksumAddress(multicallAddress), abi=abi); + multiCall = self.web3.eth.contract(self.web3.to_checksum_address(multicallAddress), abi=abi); return(multiCall); def getMultiCallAddress(self): diff --git a/setup.cfg b/setup.cfg index 10c7681..59dddef 100644 --- a/setup.cfg +++ b/setup.cfg @@ -19,4 +19,4 @@ classifiers = packages = find: include_package_data = true install_requires = - web3==5.24.0 + web3>=6.0,<=7.0 From ea0672319df5c89d790091628daef6784dcbaebf Mon Sep 17 00:00:00 2001 From: 8baller <8ball030@gmail.com> Date: Tue, 10 Oct 2023 03:14:45 +0200 Subject: [PATCH 2/4] [feat] gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b94e9fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +multicaller.egg-info +build + From 7bf1b2a387b6e3be9e48ae322618a0c50c086594 Mon Sep 17 00:00:00 2001 From: gerg Date: Fri, 20 Oct 2023 21:50:42 -0400 Subject: [PATCH 3/4] update all web3py breaking changes --- multicaller/multicaller.py | 8 ++++---- samples/sample.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/multicaller/multicaller.py b/multicaller/multicaller.py index eb71a6d..b8bcf5f 100644 --- a/multicaller/multicaller.py +++ b/multicaller/multicaller.py @@ -48,7 +48,7 @@ def getMultiCallAddress(self): @cache def getContract(self, address, abiString): abi = self.stringToList(abiString); - contract = self.web3.eth.contract(self.web3.toChecksumAddress(address), abi=abi); + contract = self.web3.eth.contract(self.web3.to_checksum_address(address), abi=abi); return(contract); @cache @@ -68,7 +68,7 @@ def decodeData(self, decoder, rawOutput): if rawOutput == b'': return None; - return(self.web3.codec.decode_abi(self.stringToList(decoder), rawOutput)); + return(self.web3.codec.decode(self.stringToList(decoder), rawOutput)); def iterArgs(self, args): isTuple = False; @@ -109,9 +109,9 @@ def addCall(self, address, abi, functionName, args=None): payload = None; if self.allowFailure: - payload = (self.web3.toChecksumAddress(address), True, callData); + payload = (self.web3.to_checksum_address(address), True, callData); else: - payload = (self.web3.toChecksumAddress(address), callData); + payload = (self.web3.to_checksum_address(address), callData); self.payload.append(payload); self.decoders.append(get_abi_output_types(fn.abi)); diff --git a/samples/sample.py b/samples/sample.py index 46f83a3..72a2a21 100644 --- a/samples/sample.py +++ b/samples/sample.py @@ -19,7 +19,7 @@ "0x263534a4fe3cb249df46810718b7b612a30ebbff" ]; -balancerVault = web3.toChecksumAddress("0xba12222222228d8ba445958a75a0704d566bf2c8"); +balancerVault = web3.to_checksum_address("0xba12222222228d8ba445958a75a0704d566bf2c8"); for tokenAddress in tokenAddresses: mc.addCall(tokenAddress, erc20Abi, 'symbol'); From b7097f6be1a8e226bac2e887d7da4d13cf82e2ac Mon Sep 17 00:00:00 2001 From: gerg Date: Fri, 20 Oct 2023 22:07:14 -0400 Subject: [PATCH 4/4] add venv and dist --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b94e9fd..7a4cc95 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ multicaller.egg-info build - +venv +dist