Anyone know what this error means in Remix - Solidity IDE?
address public constant WALLET = "A_WALLET_ADDRESS";
TypeError: Type literal_string "A_WALLET_ADDRESS" is not implicitly convertible to expected type address.
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 community
It turns out the address constant did not want a quoted string
The solution was:
address public constant WALLET = A_WALLET_ADDRESS;
If anyone can explain why, ill gladly accept the answer :)
I imagine its due to the strict type checking of Solidity variables. Giving
"0xValidAddress" fails as its type is
0xValidAddress passes the type check as a valid Ethereum address, therefore is allowed to pass on