Here's a simple contract:
contract C {
event myEvent(bool x, address y);
address someAddress;
function someAddressExist(){
if(someAddress != 0){
myEvent(true, someAddress);
}
}
function setSomeAddress(address y){
someAddress = y;
}
}
When I try to send a transaction to any address on the test network, except 0x1, it works. What's so special about this address? Are there any other addresses like that?
web3.isAddress('0x1')is returnsfalse. A bit confusing. I was thinking that maybe Solidity pads it to look like0x10000000000000000000, but it returns0x1in the log. I wonder if it's possible to do something likeaddress('0x1').send()– manidos Aug 13 '16 at 11:30isAddress()is not documented in the javascript api...you can see that in the solidity documents the type of address can be of.the form you mentioned http://solidity.readthedocs.io/en/latest/types.html. And im still not sure what you understand by a valid address – dragosb Aug 13 '16 at 11:47address.send()to0x1000000000000000000000000000000000000000, it works, but if try to send to0x0000000000000000000000000000000000000001as well as to0x1it doesn't work. What might be the problem here? – manidos Aug 14 '16 at 04:32