use of co.rsk.vm.BytecodeCompiler in project rskj by rsksmart.
the class AltBN128Test method executeCode.
private Program executeCode(String code) {
VmConfig vmConfig = config.getVmConfig();
BlockFactory blockFactory = new BlockFactory(config.getActivationConfig());
ProgramInvokeMockImpl invoke = new ProgramInvokeMockImpl();
BytecodeCompiler compiler = new BytecodeCompiler();
byte[] compiledCode = compiler.compile(code);
VM vm = new VM(vmConfig, precompiledContracts);
Program program = new Program(vmConfig, precompiledContracts, blockFactory, activations, compiledCode, invoke, null, new HashSet<>());
vm.play(program);
return program;
}
Aggregations