0
pragma solidity 0.5.1;

  
contract WissenschaftlicheArbeit {
    
    string titel;
    string autor;
    string pfad;
    string hashcode;
    bool isSignt = false;
    address adresseDesPruefers; 
   
   
    
    constructor(string memory _titel, string memory _autor, string memory _pfad, string memory _hashcode, address _adresseDesPruefers)public{
        
        titel =_titel;
        autor = _autor;
        pfad = _pfad;
        hashcode = _hashcode;
        adresseDesPruefers = _adresseDesPruefers;
    }
      modifier onlyPruefer(){
        require(msg.sender == adresseDesPruefers);
        _;
    }
    
        function arbeitSigen() public onlyPruefer {
        isSignt = true;
        
    }
}

When I am deploying this contract its saying this error:

creation of WissenschaftlicheArbeit errored: Error encoding arguments: Error: invalid address (argument="address", value="", code=INVALID_ARGUMENT, version=address/5.4.0) (argument=null, value="", code=INVALID_ARGUMENT, version=abi/5.4.0)

I have absolutly no idea. I just wanna crate a contract who only special person can sign this contract.

1
  • 1
    Generally, you have to pass a series of arguments to the constructor on deployment or it won't be happy. Share your deployment technique for more specific advice. Commented Sep 6, 2021 at 4:09

1 Answer 1

0

You have to respect the constructor when you are deploying your contract. I recommend you to read this for remix: https://remix-ide.readthedocs.io/en/latest/create_deploy.html

Since the deployment is the creation of the instance of your class, all the parameters defined must be presented, in this case you are expecting string memory _titel, string memory _autor, string memory _pfad, string memory _hashcode, address _adresseDesPruefers

It would be useful if you share the deployment mechanism and parameters to help you further

3
  • Hi, thanks for your answere. There is noting more to share. Thats all. I just wanna write in the contract three strings and one address. Commented Sep 6, 2021 at 14:49
  • You are probably not passing arguments and that’s why all of them are empty strings. How are you creating it? Truffle? Remix? Commented Sep 6, 2021 at 15:14
  • 1
    Yes you are right Commented Sep 8, 2021 at 16:21

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.