I am writing a testing file for my coin flip project here is the beginning of the coin flip project:
contract CoinFlip {
address payable player;
address payable casino;
uint256 public casinoDeposit;
uint256 betAmount;
uint256 maxBet = .001 ether;
bytes32 commitHash;
uint gameTimeOut;
uint256 matchBetTimeOut;
uint256 revealTimeOut;
uint256 result;
bool win;
address payable contractAddress = address(this);
constructor () public payable{
require(msg.value == 1 ether);
casinoDeposit = msg.value;
}
Here is the testing file:
contract CoinFlipTest { CoinFlip v;
function beforeAll() public {
// create a new instance of Value contract
v = new CoinFlip();
}
Every time I try to run the testing file I get this error. I would appreciate some help on what I am doing wrong: ✘ Before all Error Message: "Transaction has been reverted by the EVM: { "transactionHash": "0x0e839950a7737797d4c9fca76adb24d1ec0ff7d07b3b87eea5c3a8487d123043", "transactionIndex": 0, "blockHash": "0x9cc0f6017494c03c53ebbe39aef033623ed7f6e6937c6d376b7c3a0d78392b86", "blockNumber": 8, "gasUsed": 5000000, "cumulativeGasUsed": 5000000, "status": false, "to": "0xd2a5bC10698FD955D1Fe6cb468a17809A08fd005", "events": {} }"