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

Export loadContract method of runtime.interpreterEnvironment type #2824

Open
m-Peter opened this issue Sep 28, 2023 · 0 comments
Open

Export loadContract method of runtime.interpreterEnvironment type #2824

m-Peter opened this issue Sep 28, 2023 · 0 comments

Comments

@m-Peter
Copy link
Contributor

m-Peter commented Sep 28, 2023

Issue to be solved

As discussed in this onflow/cadence-tools#210 (comment), it would be useful to directly call this method, having obtained a runtime.interpreterEnvironment object, e.g. with:

env := runtime.NewBaseInterpreterEnvironment(config)

Right now, we have to duplicate the logic of this method, when using a custom handler for:

env.InterpreterConfig.ContractValueHandler

Suggested Solution

Export the loadContract method, possibly via an interface, since runtime.interpreterEnvironment is not an exported type, and cannot be used for example as a struct field.

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

No branches or pull requests

2 participants