Skip to content

Commit

Permalink
moved contract address and network url to .env
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbgit committed Jan 28, 2025
1 parent 7f93556 commit 1557171
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ LCW_API_KEY=
TELEGRAM_KEY=
MAINT_MODE=1
ALLOWED_ADMIN=
CONTRACT_ADDRESS=
NETWORK_URL=
5 changes: 3 additions & 2 deletions config_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# Network to connect to like infura
import logging
import json
from dotenv import load_dotenv
from web3 import Web3

from config_logging import (logging, log_formats, log_info, log_warning, log_debug,
Expand All @@ -25,11 +26,11 @@


# Network connection to your node or an infura like service
network_url = 'https://glq-dataseed.graphlinq.io/'
network_url = os.getenv('NETWORK_URL')
log_info('[SETTINGS] Network URL: {}' .format(network_url))

# Set the contract address
address = '0xC09062656C4715085d7D345B25a8D8A7ee477521'
address = os.getenv('CONTRACT_ADDRESS')
log_info('[SETTINGS] Contract Address: {}' .format(address))

# Load the abi
Expand Down

0 comments on commit 1557171

Please sign in to comment.