how do you reference your own contract address in vyper, for example in solidity you would do something like that:


Is there a way to do the same in vyper? Thanks.

1 Answer 1


The Vyper equivalent to Solidity's address(this) is self. You can verify it with this simple contract:

def foo() -> address:
    return self

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.