I can't compile my smart contract that I'm trying to deploy:
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract DepositContract {
// The amount of time (in hours) that the contract will run for
const uint256 DURATION_HOURS = 24;
// The payout rate (in percentage per hour)
const uint256 PAYOUT_RATE = 4.16666666667;
// Mapping from user address to their deposit balance
mapping(address => uint256) public deposits;
// The total amount of deposits in the contract
uint256 public totalDeposits;
// The start time of the contract (in seconds)
uint256 public startTime;
// The end time of the contract (in seconds)
uint256 public endTime;
// Flag to indicate whether the contract is active
bool public isActive;
constructor() public {
// Set the start and end times of the contract
startTime = now;
endTime = startTime + DURATION * 3600;
// Set the contract to be active
isActive = true;
}
// Function to deposit FTM into the contract
function deposit() public payable {
// Check that the contract is still active
require(isActive, "The contract is no longer active.");
// Check that the deposit is not zero
require(msg.value > 0, "Deposit
It keeps giving me this error:
contracts/DepositContract.sol:6:11: ParserError: Expected identifier but got 'uint256'
const uint256 DURATION_HOURS = 24;
^-----^
uint256 constant DURATION = 24;– DrGorilla.eth Jan 05 '23 at 23:05