CuEVM
Functions | Variables
python_utils Namespace Reference

Functions

CuEVM::block_info_t * getBlockDataFromPyObject (PyObject *data)
 
void print_dict_recursive (PyObject *dict, int indent_level)
 
CuEVM::evm_transaction_t * getTransactionDataFromListofPyObject (PyObject *read_roots)
 
CuEVM::state_t * getStateDataFromPyObject (PyObject *data)
 
void get_evm_instances_from_PyObject (CuEVM::evm_instance_t *&evm_instances, PyObject *read_roots, uint32_t &num_instances)
 
PyObject * pyobject_from_serialized_state (CuEVM::serialized_worldstate_data *serialized_worldstate_instance)
 
PyObject * pyobject_from_evm_instances (CuEVM::evm_instance_t *instances, uint32_t num_instances)
 
const char * adjust_hex_string (const char *hex_string)
 
void hex_to_bytes (const char *hex_string, uint8_t *byte_array, size_t length)
 
CuEVM::evm_transaction_t * getTransactionDataFromPyObject (PyObject *data, size_t &instances_count)
 

Variables

std::unordered_set< int > const bug_opcodes = {OP_ADD, OP_MUL, OP_SUB, OP_MOD, OP_EXP, OP_SELFDESTRUCT, OP_ORIGIN}
 
std::unordered_set< int > const call_opcodes = {OP_CALL, OP_CALLCODE, OP_DELEGATECALL}
 
std::unordered_set< int > const comparison_opcodes = {OP_LT, OP_GT, OP_SLT, OP_SGT, OP_EQ}
 
std::unordered_set< int > const revert_opcodes = {OP_REVERT, OP_INVALID}
 

Function Documentation

◆ adjust_hex_string()

const char* python_utils::adjust_hex_string ( const char *  hex_string)
Here is the caller graph for this function:

◆ get_evm_instances_from_PyObject()

void python_utils::get_evm_instances_from_PyObject ( CuEVM::evm_instance_t *&  evm_instances,
PyObject *  read_roots,
uint32_t &  num_instances 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBlockDataFromPyObject()

CuEVM::block_info_t * python_utils::getBlockDataFromPyObject ( PyObject *  data)
Here is the caller graph for this function:

◆ getStateDataFromPyObject()

CuEVM::state_t * python_utils::getStateDataFromPyObject ( PyObject *  data)
Here is the caller graph for this function:

◆ getTransactionDataFromListofPyObject()

CuEVM::evm_transaction_t * python_utils::getTransactionDataFromListofPyObject ( PyObject *  read_roots)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTransactionDataFromPyObject()

CuEVM::evm_transaction_t* python_utils::getTransactionDataFromPyObject ( PyObject *  data,
size_t &  instances_count 
)
Here is the call graph for this function:

◆ hex_to_bytes()

void python_utils::hex_to_bytes ( const char *  hex_string,
uint8_t *  byte_array,
size_t  length 
)
Here is the caller graph for this function:

◆ print_dict_recursive()

void python_utils::print_dict_recursive ( PyObject *  dict,
int  indent_level 
)

◆ pyobject_from_evm_instances()

PyObject * python_utils::pyobject_from_evm_instances ( CuEVM::evm_instance_t *  instances,
uint32_t  num_instances 
)

Get the pyobject from the evm instances after the transaction execution.

Parameters
[in]instancesevm instances
Returns
pyobject
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pyobject_from_serialized_state()

PyObject * python_utils::pyobject_from_serialized_state ( CuEVM::serialized_worldstate_data *  serialized_worldstate_instance)
Here is the caller graph for this function:

Variable Documentation

◆ bug_opcodes

std::unordered_set<int> const python_utils::bug_opcodes = {OP_ADD, OP_MUL, OP_SUB, OP_MOD, OP_EXP, OP_SELFDESTRUCT, OP_ORIGIN}

◆ call_opcodes

std::unordered_set<int> const python_utils::call_opcodes = {OP_CALL, OP_CALLCODE, OP_DELEGATECALL}

◆ comparison_opcodes

std::unordered_set<int> const python_utils::comparison_opcodes = {OP_LT, OP_GT, OP_SLT, OP_SGT, OP_EQ}

◆ revert_opcodes

std::unordered_set<int> const python_utils::revert_opcodes = {OP_REVERT, OP_INVALID}