Skip to content

Commit 28ddd95

Browse files
committed
Fix documentation
1 parent a189e7d commit 28ddd95

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

docs/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pygments==2.13.0 ; python_version >= "3.7" and python_version < "4.0"
4848
pynacl==1.5.0 ; python_version >= "3.7" and python_version < "4.0"
4949
pytest-cov==4.0.0 ; python_version >= "3.7" and python_version < "4.0"
5050
pytest-xdist==3.1.0 ; python_version >= "3.7" and python_version < "4.0"
51-
pytest==7.2.0 ; python_version >= "3.7" and python_version < "4.0"
51+
pytest==7.2.1 ; python_version >= "3.7" and python_version < "4.0"
5252
pytz==2022.6 ; python_version >= "3.7" and python_version < "4.0"
5353
requests==2.28.1 ; python_version >= "3.7" and python_version < "4"
5454
retry==0.9.2 ; python_version >= "3.7" and python_version < "4.0"

docs/source/guides/plutus.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ Step 3
117117
Back into the python console.
118118
Similar to `Transaction guide <../guides/transaction.html>`_, we build a chain context using `BlockFrostChainContext <../api/pycardano.backend.base.html#pycardano.backend.blockfrost.BlockFrostChainContext>`_::
119119

120-
>>> from pycardano import BlockFrostChainContext, Network
121-
>>> network = Network.TESTNET
122-
>>> context = BlockFrostChainContext("your_blockfrost_project_id", network)
120+
>>> from blockfrost import ApiUrls
121+
>>> from pycardano import BlockFrostChainContext
122+
>>> context = BlockFrostChainContext("your_blockfrost_project_id", base_url=ApiUrls.preprod.value)
123123

124124
Step 2
125125

@@ -136,6 +136,7 @@ Create script address::
136136
... PlutusData,
137137
... Redeemer,
138138
... PlutusV2Script,
139+
... Network,
139140
... )
140141

141142
>>> # This artifact was generated in step 2
@@ -144,6 +145,7 @@ Create script address::
144145
>>> gift_script = PlutusV2Script(bytes.fromhex(script_hex))
145146

146147
>>> script_hash = plutus_script_hash(gift_script)
148+
>>> network = Network.TESTNET
147149
>>> script_address = Address(script_hash, network=network)
148150

149151
Step 3

docs/source/guides/transaction.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,18 @@ To use a transaction builder, we first need to create a chain context, so the bu
105105
search proper transaction inputs to use. Currently, the available chain context is
106106
`BlockFrostChainContext <../api/pycardano.backend.base.html#pycardano.backend.blockfrost.BlockFrostChainContext>`_ ::
107107

108-
>>> from pycardano import BlockFrostChainContext, Network
108+
>>> from blockfrost import ApiUrls
109+
>>> from pycardano import BlockFrostChainContext
109110
>>> network = Network.TESTNET
110-
>>> context = BlockFrostChainContext("your_blockfrost_project_id", network)
111+
>>> context = BlockFrostChainContext("your_blockfrost_project_id", base_url=ApiUrls.preprod.value)
111112

112113

113114
Step 2
114115

115116
Read signing key into the program and generate its corresponding verification key::
116117

117-
>>> from pycardano import PaymentSigningKey, PaymentVerificationKey, Address
118+
>>> from pycardano import PaymentSigningKey, PaymentVerificationKey, Address, Network
119+
>>> network = Network.TESTNET
118120
>>> sk = PaymentSigningKey.load("path/to/payment.skey")
119121
>>> vk = PaymentVerificationKey.from_signing_key(sk)
120122
>>> address = Address(pvk.hash(), svk.hash(), network)

0 commit comments

Comments
 (0)