SPDX license identifier not provided in source file.
报错原文:
SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: " to each source file. Use “SPDX-License-Identifier: UNLICENSED” for non-open-source code. Please see https://spdx.org for more information.
警告原因:
soliidity 0.6.8 引入了SPDX,使用时要在文件第一句加上SPDX-License-Identifier:
格式的语句。
解决:在代码首行加上如下注释
// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.8.0;
contract test{
}