totalSupply says 1000 but every balance is zero. The supply is a number nobody owns.
In the constructor, credit the deployer:
balanceOf[msg.sender] = totalSupply;
There is no minting machinery in ERC-20. Creating tokens is writing a number into a mapping.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract Token {
string public name = "Academy";
string public symbol = "ACAD";
uint8 public constant decimals = 18;
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor() {
totalSupply = 1000;
}
function transfer(address to, uint256 amount) external returns (bool) {
return true;
}
}