Burning the tokens as a way to purchase the nfts isn't ideal business practice. You could instead send those funds to a charity or the devs.
contract SantasList is ERC721, TokenUri {
function buyPresent(address presentReceiver) external {
+ i_santaToken.sendToCharity(msg.sender, PURCHASED_PRESENT_COST);
_mintAndIncrement();
}
}
contract SantaToken is ERC20 {
address public charityAddress;
function setCharityAddress(address _charityAddress) external onlyOwner {
charityAddress = _charityAddress;
}
function sendToCharity(address from, uint256 amount) external {
if (msg.sender != i_santasList) revert SantaToken__NotSantasList();
_transfer(from, charityAddress, amount);
}
}