parser.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:viper 作者: ethereum 项目源码 文件源码
def parse_other_functions(o, otherfuncs, _globals, sigs, external_contracts, origcode, runtime_only=False):
    sub = ['seq', initializer_lll]
    add_gas = initializer_lll.gas
    for _def in otherfuncs:
        sub.append(parse_func(_def, _globals, {**{'self': sigs}, **external_contracts}, origcode))
        sub[-1].total_gas += add_gas
        add_gas += 30
        sig = FunctionSignature.from_definition(_def, external_contracts)
        sig.gas = sub[-1].total_gas
        sigs[sig.name] = sig
    if runtime_only:
        return sub
    else:
        o.append(['return', 0, ['lll', sub, 0]])
        return o


# Main python parse tree => LLL method
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号