I found out, that I can pass different data types (as argument), even if the Solidity method takes only uint data type, why is that possible?
Example:
function test (uint _param) public {
//do smth
}
test(address(ADDRESS_VAR))
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityThere is no data type in the calldata. They are all coded as hexadecimal. So if you pass to the contract an address like this: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
, EVM thinks, "ok, there is no problem. It is a number". Because you can convert it to uint: 697323163401596485410334513241460920685086001293
.