Truffle is currently using solc 0.5.16, but one or more of your contract
change truffle-config.js's version
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
}
},
compilers: {
solc: {
version: "^0.8.0"
}
}
};