Skip to content

Internal functions can't be accessed in submodules #393

@AlbertoCentonze

Description

@AlbertoCentonze

Given a helper.vy module used by a main.vy contract:

# helper.vy

def foo():
   pass
# main.vy

import helper

@external
def bar():
    helper.foo()

A VyperContract doesn't have a way to access the foo method without:

  1. Using .eval (slow)
  2. Using function injection (slow)
  3. Deploying the module standalone (not always possible if uses is used)

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