2

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

address(this)

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

1

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

@public
@constant
def foo() -> address:
    return self
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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