use of org.aion.zero.impl.vm.precompiled.ExternalCapabilitiesForPrecompiled in project aion by aionnetwork.
the class ExternalStateForFvm method runInternalPrecompiledContractCall.
/**
* Executes an internal precompiled contract call and returns the result.
*
* @param context The context of the internal transaction.
* @return the execution result.
*/
@Override
public FastVmTransactionResult runInternalPrecompiledContractCall(ExecutionContext context) {
PrecompiledTransactionContext precompiledContext = toPrecompiledTransactionContext(context);
CfgFork cfg = new CfgFork();
String forkProperty = cfg.getProperties().getProperty("fork0.3.2");
boolean fork032Enabled = (forkProperty != null) && (blockNumber >= Long.valueOf(forkProperty));
IExternalStateForPrecompiled precompiledWorldState = new ExternalStateForPrecompiled(this.repository, this.blockNumber, this.isLocalCall, fork032Enabled, this.allowNonceIncrement);
PrecompiledTransactionResult result = ContractExecutor.executeInternalCall(new ExternalCapabilitiesForPrecompiled(), precompiledWorldState, precompiledContext, context.getTransactionData(), context.getTransactionEnergy());
return precompiledToFvmResult(result);
}
Aggregations