overide env variables

This commit is contained in:
Carlosokumu 2024-12-21 09:41:20 +03:00
parent 2055038c80
commit e239e73cd5
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -65,7 +65,7 @@ def t_error(t):
lexer = lex.lex() lexer = lex.lex()
load_dotenv() load_dotenv(override=True)
# Chain Params # Chain Params
chainId = os.getenv("CHAIN_ID", "44787") chainId = os.getenv("CHAIN_ID", "44787")
@ -783,12 +783,10 @@ def voucher_mint_handler(cmd):
voucher_symbols = list(map(lambda symbol: symbol["symbol"], data)) voucher_symbols = list(map(lambda symbol: symbol["symbol"], data))
voucher_address = list(map(lambda address: address["voucher_address"], data)) voucher_address = list(map(lambda address: address["voucher_address"], data))
voucher_owners = list(map(lambda address: address["owner"], data))
if voucher_symbol in voucher_symbols: if voucher_symbol in voucher_symbols:
index = voucher_symbols.index(voucher_symbol) index = voucher_symbols.index(voucher_symbol)
s = voucher_address[index] s = voucher_address[index]
privatekey = voucher_owners[index]
else: else:
raise ValueError(f"Voucher with symbol {voucher_symbol} was not found") raise ValueError(f"Voucher with symbol {voucher_symbol} was not found")
@ -800,7 +798,7 @@ def voucher_mint_handler(cmd):
) )
command = ( command = (
f"cast send --private-key {privatekey} " f"cast send --private-key {master_private_key} "
f"--rpc-url {rpc} " f"--rpc-url {rpc} "
f"--nonce {nonce} " f"--nonce {nonce} "
f" {s} " f" {s} "