add public methods

This commit is contained in:
yihuang 2025-11-12 00:51:04 +08:00
parent fc454d0e33
commit acb98d2c66
No known key found for this signature in database
GPG key ID: 0C37B20DA93E3788

View file

@ -697,3 +697,18 @@ func (evm *EVM) GetVMContext() *tracing.VMContext {
StateDB: evm.StateDB,
}
}
// ReadOnly returns whether the EVM is in staticcall mode
func (evm *EVM) ReadOnly() bool {
return evm.readOnly
}
// ReturnData returns the return data from the last call
func (evm *EVM) ReturnData() []byte {
return evm.returnData
}
// SetReturnData sets the return data for subsequent calls
func (evm *EVM) SetReturnData(data []byte) {
evm.returnData = data
}