Closed CryptoPascal31 closed 1 month ago
Since Pact core enables writing top-level functions, I'm not sure that (env-enable-repl-natives ) is still useful.
Top-level functions are repl-only. This is purely for convenience. I can disable them in .pact
files in the future. They should only be enabled in .repl
files.
Always disable REPL natives in module context
I'm ok with making it opt-in like prod. I've already used repl natives numerous times to debug contracts within pact-5 so I don't think I want to remove this capability.
I think we can implement env-enable-repl-natives
with relative ease. I was already doing so in a separate branch, but work got halted for more important issues. We'll look into it again
This was completed by #114 in March.
Pact legacy was disallowing by default REPL natives in module code. Preventing developers testing modules that finally aren't deployable on chain.
Pact legacy was providing the convenient API
(env-enable-repl-natives )
to however enable them for special cases.Pact core always allows the usage of REPL natives in module code. IMO, it should not.
Since Pact core enables writing top-level functions, I'm not sure that
(env-enable-repl-natives )
is still useful.I suggest the following:
(env-enable-repl-natives )
in Pact core