0

I have to: Write a Contract Constructor that will store the addresses at each of the member variables you declared in the previous stage. The arbiter and beneficiary will be arguments to the constructor (in that order respectfully) and the depositor will be the address calling the function.

And i have this:

pragma solidity ^0.4.19; // TODO: declare version ^0.4.19

contract EscrowContract {
    // TODO: create member variables
    address public depositor;
    address public beneficiary;
    address public arbiter;
    function EscrowContract (address _abiter, address _beneficiary) public {
    // your code here

    } 
}

And i get this:

contracts/escrow.sol:8:27: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
    function EscrowContract (address _abiter, address _beneficiary) public {
                             ^-------------^

contracts/escrow.sol:8:44: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
    function EscrowContract (address _abiter, address _beneficiary) public {
                                              ^------------------^

I DONT KNOW HOW TO REMOVE OR COMMENT OUT THE VARIABLE NAME.

Thank you for your help.

  • 1
    Are you also new to programming in general? Because if that function takes input parameter then it is probably meant to do something about them! – goodvibration Dec 9 '19 at 8:37
0

Change this:

function EscrowContract(address _abiter, address _beneficiary) public {
}

To this:

function EscrowContract(address _abiter, address _beneficiary) public {
    abiter = _abiter;
    beneficiary = _beneficiary;
}

Or better yet, to this:

constructor(address _abiter, address _beneficiary) public {
    abiter = _abiter;
    beneficiary = _beneficiary;
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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