Content pfp
Content
@
0 reply
0 recast
2 reactions

maks pfp
maks
@maks
Let's say internally you store `var` as a `uint64`, in a public function with a `var` param do you type it as a `uint64` or type it as a `uint256` and `safeCast` it? Feels like using a `uint256` in the public api is cleaner from a consumer perspective? But obviously at a cost.
1 reply
0 recast
0 reaction

nix pfp
nix
@nix
Is there a cost? Function arguments are not packed in Solidity, so the param is consuming a u256 anyway, I believe. https://ethereum.stackexchange.com/questions/40555/does-the-order-of-function-parameters-matter-in-regards-to-variable-types
1 reply
0 recast
0 reaction

maks pfp
maks
@maks
`SafeCast` will add some gas at a minimum to run the check, but fairly minimal. Not very clean from an aesthetic standpoint either.
0 reply
0 recast
0 reaction