Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
fix(engine) Lookup contract name from the logic manager
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <[email protected]>
jeromesimeon committed Apr 19, 2021
1 parent da1f88b commit 8bd9683
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ergo-engine/lib/engine.js
Original file line number Diff line number Diff line change
@@ -192,6 +192,7 @@ class Engine {
invoke(logic, contractId, clauseName, contract, params, state, currentTime, utcOffset, options, validateOptions) {
const modelManager = logic.getModelManager();
const scriptManager = logic.getScriptManager();
const contractName = logic.getContractName();

// Set the current time and UTC Offset
const { currentTime: now, utcOffset: offset } = Util.setCurrentTime(currentTime, utcOffset);
@@ -208,7 +209,7 @@ class Engine {
Logger.debug('Engine processing clause ' + clauseName + ' with state ' + state.$class);

const script = this.cacheJsScript(scriptManager, contractId);
const callScript = getInvokeCall(contractId, clauseName);
const callScript = getInvokeCall(contractName, clauseName);
const context = {
data: validContract.serialized,
state: validState,

0 comments on commit 8bd9683

Please sign in to comment.