mezoAgent 0.1.1__tar.gz → 0.1.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {mezoagent-0.1.1 → mezoagent-0.1.2}/PKG-INFO +1 -1
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoAgent.egg-info/PKG-INFO +1 -1
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoTransactionTool/transaction_tools.py +11 -1
- {mezoagent-0.1.1 → mezoagent-0.1.2}/setup.py +1 -1
- {mezoagent-0.1.1 → mezoagent-0.1.2}/README.md +0 -0
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoAgent.egg-info/SOURCES.txt +0 -0
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoAgent.egg-info/dependency_links.txt +0 -0
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoAgent.egg-info/requires.txt +0 -0
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoAgent.egg-info/top_level.txt +0 -0
- {mezoagent-0.1.1 → mezoagent-0.1.2}/mezoTransactionTool/__init__.py +0 -0
- {mezoagent-0.1.1 → mezoagent-0.1.2}/setup.cfg +0 -0
@@ -17,12 +17,22 @@ if os.path.exists(USER_ENV_PATH):
|
|
17
17
|
else:
|
18
18
|
print("⚠️ Warning: No `.env` file found in your project directory! Transactions requiring signing may fail.")
|
19
19
|
|
20
|
-
# ✅ Load Private
|
20
|
+
# ✅ Load Private Keys from User's `.env`
|
21
21
|
PRIVATE_KEY = os.getenv("PRIVATE_KEY")
|
22
|
+
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
22
23
|
if not PRIVATE_KEY:
|
23
24
|
print("⚠️ Warning: PRIVATE_KEY not set. Please create a `.env` file in your project with your keys.")
|
24
25
|
PRIVATE_KEY = None # Allow package to be installed but prevent transactions
|
25
26
|
|
27
|
+
RPC_URL = "https://rpc.test.mezo.org"
|
28
|
+
|
29
|
+
# ✅ Initialize Web3 instance
|
30
|
+
web3_instance = Web3(Web3.HTTPProvider(RPC_URL))
|
31
|
+
|
32
|
+
# ✅ Check if connection is successful
|
33
|
+
if not web3_instance.is_connected():
|
34
|
+
raise ConnectionError("❌ Failed to connect to Mezo Matsnet RPC.")
|
35
|
+
|
26
36
|
# ✅ Create Account Object
|
27
37
|
account = Web3.eth.account.from_key(PRIVATE_KEY)
|
28
38
|
sender_address = account.address
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|