Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpret a MockChain into the Plutus Contract monad. #38

Closed
VictorCMiraldo opened this issue Dec 7, 2021 · 3 comments
Closed

Interpret a MockChain into the Plutus Contract monad. #38

VictorCMiraldo opened this issue Dec 7, 2021 · 3 comments

Comments

@VictorCMiraldo
Copy link
Contributor

If would be great if we could implement or interpret MonadMockChain into the Contract monad, this way we could really sell our library as a superior option for defining the lowest level of off-chain code: the part that generates transaction constraints.

@VictorCMiraldo
Copy link
Contributor Author

@VictorCMiraldo
Copy link
Contributor Author

#45 closes this

@VictorCMiraldo
Copy link
Contributor Author

For documentation's sake:

As of merging #45, time management closely follows that of plutus-contract. The reason being that we want to provide an instance of MonadMockChain (Contract w s e) and its impossible to retrieve the SlotConfig from within the contract monad.

Ok... its not impossible... we can observe the slot config by waitNSlots 1, then recording the current time t0, then repeating this and getting t1. Now we could do some linear extrapolation and find out SlotConfig. I'm not sure its worthwhile to do all of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant