Commit c3a5ef3b authored by aniket-engg's avatar aniket-engg Committed by Aniket

blockhash, type defs in test file & module import

parent 5681ff8b
export { default as txOrigin } from './txOrigin'
export { default as gasCosts } from './gasCosts'
export { default as thisLocal } from './thisLocal'
export { default as checksEffectsInteraction } from './checksEffectsInteraction'
export { default as constantFunctions } from './constantFunctions'
export { default as similarVariableNames } from './similarVariableNames'
export { default as inlineAssembly } from './inlineAssembly'
export { default as blockTimestamp } from './blockTimestamp'
export { default as lowLevelCalls } from './lowLevelCalls'
export { default as blockBlockhash } from './blockBlockhash'
export { default as noReturn } from './noReturn'
export { default as selfdestruct } from './selfdestruct'
export { default as guardConditions } from './guardConditions'
export { default as deleteDynamicArrays } from './deleteDynamicArrays'
export { default as assignAndCompare } from './assignAndCompare'
export { default as erc20Decimals } from './erc20Decimals'
export { default as stringBytesLength } from './stringBytesLength'
export { default as intDivisionTruncate } from './intDivisionTruncate'
export { default as etherTransferInLoop } from './etherTransferInLoop'
export { default as deleteFromDynamicArray } from './deleteFromDynamicArray'
export { default as forLoopIteratesOverDynamicArray } from './forLoopIteratesOverDynamicArray'
\ No newline at end of file
...@@ -132,7 +132,7 @@ const specialVariables: Record<string, SpecialObjDetail> = { ...@@ -132,7 +132,7 @@ const specialVariables: Record<string, SpecialObjDetail> = {
BLOCKHASH: { BLOCKHASH: {
obj: 'block', obj: 'block',
member: 'blockhash', member: 'blockhash',
type: buildFunctionSignature([basicTypes.UINT], [basicTypes.BYTES32], false) type: buildFunctionSignature([basicTypes.UINT], [basicTypes.BYTES32], false, 'view')
} }
} }
...@@ -808,7 +808,8 @@ function isBlockTimestampAccess (node: MemberAccessAstNode): boolean { ...@@ -808,7 +808,8 @@ function isBlockTimestampAccess (node: MemberAccessAstNode): boolean {
* @return {bool} * @return {bool}
*/ */
function isBlockBlockHashAccess (node: FunctionCallAstNode): boolean { function isBlockBlockHashAccess (node: FunctionCallAstNode): boolean {
return isBuiltinFunctionCall(node) && getLocalCallName(node) === 'blockhash' return ( isBuiltinFunctionCall(node) && getLocalCallName(node) === 'blockhash' ) ||
isSpecialVariableAccess(node.expression, specialVariables.BLOCKHASH)
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment