@@ -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