Learn how to create and validate Stratus functions with proper syntax, module restrictions, and best practices
module.exports
.
input
– holds input dataoutput
– provides methods for setting and building the function’s outputoutput.setResult
to set the result object.
output.buildOutput()
. Omitting this call is not allowed.require()
, but only approved packages are allowed:
axios
lodash
viem
and its approved subpath viem/chains
fs
)module.exports
(aside from the handler) is allowed and will not affect validation:
Multiple Handler Exports
Missing Output Calls
Dynamic Require Usage
input
and output
output.setResult
and output.buildOutput()
within your handler