getting error: Variable 0p_FoldList_ is never assigned #326
reitcircles
started this conversation in
General
Replies: 3 comments 23 replies
-
Can you please report the full error message and ideally the surrounding code of the code invocation in a minimal example? |
Beta Was this translation helpful? Give feedback.
7 replies
-
Do you have any clue ...that i can use to debug this topic ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
```
from opshin.prelude import *
@DataClass()
class Policydatum(PlutusData):
CONSTR_ID = 1
oref: TxOutRef
name_usr_nft: bytes
name_ref_nft: bytes
def has_utxo( oref: TxOutRef, context: ScriptContext) -> bool:
return any([oref == i.out_ref for i in context.tx_info.inputs])
def validator( datum: Policydatum, redeemer: None, context: ScriptContext) -> None:
print("ENTERED VALIDATOR")
assert has_utxo(datum.oref, context), "UTxO not consumed"
```
…On Wed, 31 Jan 2024 at 18:11, Niels Mündler ***@***.***> wrote:
I never encountered this bug myself and I am regularly compiling and
executing a number of contracts. If you share the smart contract code I can
try to reproduce the error.
—
Reply to this email directly, view it on GitHub
<#326 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXPVZFWC5S7SKIAPGOYPFK3YRJ3LNAVCNFSM6AAAAABCTKF6XGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DGMRTHAYTG>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following is the datum structure in opshin:
It was working earlier but now this seems to be a problem
opshin: Version: 0.18.1
pycardano: Version: 0.9.0
Beta Was this translation helpful? Give feedback.
All reactions