Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

mk_signature is confused by create #119

@MicahZoltu

Description

@MicahZoltu
from ethereum import tester
import os
import serpent

library = """
def bar():
    ~return(0, 32)
"""

code = """
def foo():
    return(create('garbage.se'))
"""

with open("garbage.se", "w") as file:
    file.write(library)

try:
    state = tester.state()
    state.block.number += 2000000
    print(serpent.mk_signature(code))
finally:
    os.remove("garbage.se")

Output:

extern garbage.se: [bar:[]:]

Notice that the signature is missing a return type.

The same problem occurs if you return(1: uint256) from bar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions