Replies: 4 comments 1 reply
-
@jaglinux thanks for starting this discussion - when I was writing the code for the
/// @dev Overrides the `decimals` function to use the custom value of 6.
function decimals() public view virtual override returns (uint8) {
return 6;
} If you do this, you (should) know what you're doing. And the same holds for my |
Beta Was this translation helpful? Give feedback.
-
@pcaversaccio Thanks for detailed explanation. |
Beta Was this translation helpful? Give feedback.
-
UPDATE: I made |
Beta Was this translation helpful? Give feedback.
-
https://github.com/pcaversaccio/snekmate/blob/main/src/tokens/ERC20.vy#L78 is declared constant.
Is it better to declare it as immutable so that the user can set the value in constructor ? rather than changing the code.
(I guess Vyper does not support virtual / override and hence the decision to have decimals as constant.)
Beta Was this translation helpful? Give feedback.
All reactions