Skip to content

Commit 62161ad

Browse files
committed
Add min_utxo to ProtocolParameters returned by ogmios
1 parent f8daca6 commit 62161ad

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pycardano/backend/ogmios.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ def protocol_param(self) -> ProtocolParameters:
108108
max_collateral_inputs=result["maxCollateralInputs"],
109109
coins_per_utxo_word=result["coinsPerUtxoWord"],
110110
)
111+
112+
args = {"query": "genesisConfig"}
113+
result = self._request(method, args)
114+
param.min_utxo = result["protocolParameters"]["minUtxoValue"]
115+
111116
self._protocol_param = param
112117
return self._protocol_param
113118

test/pycardano/backend/test_ogmios.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
"slotLength": 1,
4242
"updateQuorum": 2,
4343
"maxLovelaceSupply": 1000000000000,
44+
"protocolParameters": {
45+
"minUtxoValue": 1000000,
46+
}
4447
}
4548

4649
UTXOS = [
@@ -108,7 +111,7 @@ def test_protocol_param(self):
108111
extra_entropy="neutral",
109112
protocol_major_version=5,
110113
protocol_minor_version=0,
111-
min_utxo=None,
114+
min_utxo=1000000,
112115
min_pool_cost=0,
113116
price_mem=0.1,
114117
price_step=0.1,

0 commit comments

Comments
 (0)