Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mk_signature is confused by create #119

Open
MicahZoltu opened this issue Jun 13, 2017 · 0 comments
Open

mk_signature is confused by create #119

MicahZoltu opened this issue Jun 13, 2017 · 0 comments

Comments

@MicahZoltu
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant