t.ok(common.isThisLocalCall(node),'is this.local_method() used should work')
'attributes':{
t.notOk(common.isBlockTimestampAccess(node),'is block.timestamp used should not work')
'operator':'=',
t.notOk(common.isNowAccess(node),'is now used should not work')
'type':'uint256'
},
'children':[
{
'attributes':{
'type':'uint256'
},
'children':[
{
'attributes':{
'type':'mapping(address => uint256)',
'value':'c'
},
'id':61,
'name':'Identifier',
'src':'873:1:0'
},
{
'attributes':{
'member_name':'sender',
'type':'address'
},
'children':[
{
'attributes':{
'type':'msg',
'value':'msg'
},
'id':62,
'name':'Identifier',
'src':'875:3:0'
}
],
'id':63,
'name':'MemberAccess',
'src':'875:10:0'
}
],
'id':64,
'name':'IndexAccess',
'src':'873:13:0'
},
{
'attributes':{
'hexvalue':'30',
'subdenomination':null,
'token':null,
'type':'int_const 0',
'value':'0'
},
'id':65,
'name':'Literal',
'src':'889:1:0'
}
],
'id':66,
'name':'Assignment',
'src':'873:17:0'
}
varinlineAssembly={
'children':[
],
'id':21,
'name':'InlineAssembly',
'src':'809:41:0'
}
t.throws(()=>common.getEffectedVariableName(inlineAssembly),'staticAnalysisCommon.js: not an effect Node or inline assembly','get from inline assembly should throw')
t.ok(common.getEffectedVariableName(assignment)==='c','get right name for assignment')
t.throws(()=>common.getEffectedVariableName({name:'MemberAccess'}),undefined,'should throw on all other nodes')