Common Precompile
type Precompile struct A base struct that extends the standard Cosmos EVM precompile. It overrides RunNativeAction to detect RevertWithData errors and correctly set the EVM return buffer, enabling rich error handling in Solidity.
Parameters
This method has no parameters.
Returns
Type:
struct Embed this struct in your specific precompile implementation.
Examples
Embedding in a new precompile
type MyPrecompile struct {
common.Precompile
}
func NewMyPrecompile(...) *MyPrecompile {
return &MyPrecompile{
Precompile: common.Precompile{...},
}
}