This is so frustrating and I don't know why these errors don't give more information.
I compiled and deployed a contract in remix using the left panel and everything is working fine. I then proceeded to make a test file for my contract in the /tests
folder in Remix.
Here is my test file:
pragma solidity ^0.8.0;
import "../contracts/Buds.sol";
contract BudsTester {
Buds codeTested;
function beforeEach() public {
codeTested = new Buds(0x988401257b1D1630681e0C51176db25b0d3a69e5, 0x0CF74C6B34560FF9116CA9E19fc06A6FB5Cf65c0, [0xB4a925BAe55743AcF3Dc65a8de0b9507F0491617, 0x288071244112050c93389A950d02c9E626D611dD]);
}
function constructorParamatersShouldWork() public {
//implement logic to test constructor fires correctly
}
}
As you can see I call the constructor of the contract I'm testing in beforeEach(). The problem is my contract's constructor() is set up with the following parameters:
constructor(address goodBudWalletAddress, address smokeOutWalletAddress, address[] memory teamMembers) {
//logic in here
}
The error I get in the beforeEach() function with auto compile is this:
TypeError: Invalid type for argument in function call. Invalid implicit conversion from address[2] memory to address[] memory requested. --> tests/Buds_test.sol:9:119:
|
9| ... B34560FF9116CA9E19fc06A6FB5Cf65c0, [0xB4a925BAe55743AcF3Dc65a8de0b9507F0491617, 0x288071244112050c93389A950d02c9E626D611dD]);
|
Thank you for any help you provide, I greatly appreciate it!
address()
keywordaddress
toaddress payable
. I couldn't even find any function in solidity calledaddress()
... Thanks for the help