Skip to content

RE0085: closure cannot exist at runtime? #911

Answered by DanBurton
DanBurton asked this question in Q&A
Discussion options

You must be logged in to vote

Notice that it's telling you the location of the error is the identifier BuyerAddress as it appears on this line

  transfer(balance(NFT), NFT).to(BuyerAddress);

You've defined BuyerAddress on this line:

  const BuyerAddress = call(Creator.setBuyer).assume(() => assume(true)); // not sure about this

The error message says that BuyerAddress has a closure in it which can't exist at runtime.
Check the docs for call to help understand why this is:

https://docs.reach.sh/rsh/step/#rsh_call

You should think of APIs from the caller's perspective. Instead of this:

    setBuyer: Fun([], Address)

I think you want to do something like this:

  setBuyer: Fun([Address], Null)

And then you write the call

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@Fraccas
Comment options

@lorenzopolidori
Comment options

@jeapostrophe
Comment options

@Fraccas
Comment options

@Fraccas
Comment options

Answer selected by jeapostrophe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants