Skip to content

Commit fb48148

Browse files
committed
hopfully fixed file locality so it can be used as package
1 parent 07d18df commit fb48148

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

IceCreamSwapWeb3/Multicall.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import copy
2+
from importlib.resources import files
23
from time import sleep
34
from typing import Optional
45

@@ -13,13 +14,13 @@
1314
from IceCreamSwapWeb3 import Web3Advanced
1415

1516
# load multicall abi
16-
with open("./abi/Multicall.abi") as f:
17+
with files("IceCreamSwapWeb3").joinpath("./abi/Multicall.abi").open('r') as f:
1718
MULTICALL_ABI = f.read()
1819

1920
# load undeployed multicall abi and bytecode
20-
with open("./abi/UndeployedMulticall.abi") as f:
21+
with files("IceCreamSwapWeb3").joinpath("./abi/UndeployedMulticall.abi").open('r') as f:
2122
UNDEPLOYED_MULTICALL_ABI = f.read()
22-
with open("./bytecode/UndeployedMulticall.bytecode") as f:
23+
with files("IceCreamSwapWeb3").joinpath("./bytecode/UndeployedMulticall.bytecode").open('r') as f:
2324
UNDEPLOYED_MULTICALL_BYTECODE = f.read()
2425

2526
# allowed chars in HEX string

0 commit comments

Comments
 (0)