4

Here's the contract:

contract Martyr{
  function Martyr(){ 
    var address0 = 0x093ff7d4edbd201f1762297e31afcde50bdf4c81;
    address0.call(bytes4(0x2808241a),0x85a46e616d65a673746f726533a870726f647563747390a4696e666fc0ae7375626d61726b6574416464727390aa7472616e73706f7274739183a26964a737353837373439a474797065a461736664a57072696365a132);
    suicide(msg.sender);
  }
}

And here's the error it generates

:3:60: Error: Member "call" not found or not visible after argument-dependent lookup in uint160 var address0 = 0x093ff7d4edbd201f1762297e31afcde50bdf4c81; address0.call(bytes4(0x2808241a),0x85a46e616d65a673746f726533a870726f647563747390a4696e666fc0ae7375626d61726b6574416464727390aa7472616e73706f7274739183a26964a737353837373439a474797065a461736664a57072696365a132);

Whats the error trying to say, and how can I solve it?

1 Answer 1

2

Use address address0 = 0x093ff7d4edbd201f1762297e31afcde50bdf4c81;

Then put quotes around 0x85a46....

Those will fix the errors in https://ethereum.github.io/browser-solidity

There will be warnings about the address (check that it's correct) and use bool unused = address0.call... to avoid Warning: Return value of low-level calls not used.

4
  • Nice, thank you. How come quotes are needed around 0x85...? Won't that cause it to be interpreted as a string? I need it to be interpreted as bytes
    – Akhil F
    Feb 24, 2016 at 23:32
  • 1
    Solidity Browser was giving error "Integer constant too large"... I think with quotes it will still be treated as bytes. EDIT March 2017: The quotes will now treat it as a string so need to try this for bytes: ethereum.stackexchange.com/questions/13483/…
    – eth
    Feb 24, 2016 at 23:39
  • var is solidity
    – RFV
    Mar 25, 2017 at 2:52
  • @RFVenter Right, I forgot about var since it's rarely used and possibly an anti-pattern like solidity.readthedocs.io/en/develop/…
    – eth
    Mar 31, 2017 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.