Here is what i have read on this vyper official documentation:


int128 1

uint256 1

I have create this very basic smartcontract:

variable_test: int128

def myfunction() -> int128:
  return self.variable_test

The myfunction function should return 1 according to the documentation, but it returns 0...

Any idea ?


1 Answer 1


That documentation can't possibly correct :-) Else you couldn't reliably convey the meaning of 1 (or 0).

The docs you've linked to do appear to contradict with the values in the Vyper GitHub pages, which appear to make more sense:

Type    Default Value
address  0x0000000000000000000000000000000000000000
bool    False
bytes32 0x0000000000000000000000000000000000000000000000000000000000000000
decimal 0.0
int128  0
uint256 0


In fact they were wrong on the GitHub pages as well until someone made a PR to correct them.

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.