小编Gog*_*gle的帖子

警告:源文件中未提供 SPDX 许可证标识符

我创建了一个新的 Solidity 合约。合同已启动并正在运行,但给了我这个警告。

Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
Run Code Online (Sandbox Code Playgroud)

编译时没有错误。

我在https://remix.ethereum.org/ 中使用的编译器版本是 v0.7.5+commit.eb77ed08 语言:Solidity EVM 版本:编译器默认值

每当我按下编译时,它都会给我警告,但部署时没有问题。

我的代码片段:

pragma solidity ^0.7.5;
contract TestContract {
// Some logic
}


Run Code Online (Sandbox Code Playgroud)

blockchain solidity remix

11
推荐指数
1
解决办法
1万
查看次数

标签 统计

blockchain ×1

remix ×1

solidity ×1