I'm trying to verify my deployed contract on etherscan.io
However I get the following error:
"rror! Unable to generate Contract ByteCode and ABI"
I'm not putting in an ABI because my constructor doesn't have any values or arguments.
What am I doing wrong?
Below is my contract code:
pragma solidity ^0.4.0;
// deploying contract on account 0x80A3bA6F52D63aFF73cA582343C2F67046DcEC6f
contract PayCheck {
//List all the empolyees ethereum payment addresses in an array.
address[] employees = [0x9391ea51c338410B6603e38dD14C00a1b218C8d5, 0x9391ea51c338410B6603e38dD14C00a1b218C8d5 ];
//Set a variable that trackes the total recieved to the contract, starting with 0.
uint totalReceived = 0;
//Create a dictionary that tracks how much as been withdrawn to each ethereum address.
mapping (address => uint) withdrawnAmounts;
//This function updates the total amount that's been sent to the contract
function PayCheck() payable {
updateTotal();
}
function () payable {
updateTotal();
}
// This is an internal function that updates the total amount that's been sent to the contract.
function updateTotal() internal {
totalReceived += msg.value;
}
//Here is a modifier that ensures only people in the empolyees list that execute the withdraw function.
modifier canWidthdraw() {
bool contains = false;
//A simple for loop that check if they are in the empolyee list before it's aloud to execute the function this modifier is assigned to.
for(uint i = 0; i < employees.length; i++) {
if(employees[i] == msg.sender) {
contains = true;
}
}
require(contains);
_;
}
// Function that calculates what the user can withdraw and to where.
function withdraw() canWidthdraw {
uint amountAllocated = totalReceived/employees.length;
uint amountWithdrawn = withdrawnAmounts[msg.sender];
uint amount = amountAllocated - amountWithdrawn;
withdrawnAmounts[msg.sender] = amountWithdrawn + amount;
if (amount > 0) {
msg.sender.transfer(amount);
}
}
}