Skip to content

Commit 3bcec94

Browse files
committed
Fix rebase errors & regenerate yarn.lock
1 parent 88c1d00 commit 3bcec94

File tree

2 files changed

+7021
-2238
lines changed

2 files changed

+7021
-2238
lines changed

lib/injector.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Injector {
7272
*/
7373
_getDefaultMethodDefinition(id){
7474
const hash = web3Utils.keccak256(id).slice(2,10);
75-
const method = this._getMethodIdentifier(id);
75+
const method = this._getDefaultMethodIdentifier(id);
7676
return `\nfunction ${method}(bytes8 c__${hash}) internal pure {}\n`;
7777
}
7878

@@ -97,7 +97,7 @@ class Injector {
9797
_getTrueMethodDefinition(id){
9898
const hash = web3Utils.keccak256(id).slice(2,10);
9999
const method = this._getTrueMethodIdentifier(id);
100-
return `function ${method}(bytes8 c__${hash}) public pure returns (bool){ return true; }\n`;
100+
return `function ${method}(bytes8 c__${hash}) internal pure returns (bool){ return true; }\n`;
101101
}
102102

103103
/**
@@ -109,7 +109,7 @@ class Injector {
109109
_getFalseMethodDefinition(id){
110110
const hash = web3Utils.keccak256(id).slice(2,10);
111111
const method = this._getFalseMethodIdentifier(id);
112-
return `function ${method}(bytes8 c__${hash}) public pure returns (bool){ return false; }\n`;
112+
return `function ${method}(bytes8 c__${hash}) internal pure returns (bool){ return false; }\n`;
113113
}
114114

115115
_getModifierDefinitions(contractId, instrumentation){
@@ -308,12 +308,12 @@ class Injector {
308308
const end = contract.instrumented.slice(injectionPoint);
309309
const id = `${fileName}:${injection.contractName}`;
310310

311-
const defaultMethodDefinition = (injection.isFileScoped)
311+
const methodDefinition = (injection.isFileScoped)
312312
? this._getFileScopedHashMethodDefinition(id)
313-
: this._getHashMethodDefinition(id);
313+
: this._getDefaultMethodDefinition(id);
314314

315315
contract.instrumented = `${start}` +
316-
`${defaultMethodDefinition}` +
316+
`${methodDefinition}` +
317317
`${this._getTrueMethodDefinition(id)}` +
318318
`${this._getFalseMethodDefinition(id)}` +
319319
`${this._getModifierDefinitions(id, instrumentation)}` +

0 commit comments

Comments
 (0)