“迁移”在部署时遇到无效的操作码。尝试:
我的migration.sol代码
// SPDX-License-Identifier: UNLICENSED
//the version of solidity that is compatible
pragma solidity ^0.8.0;
contract Migrations {
address public owner = msg.sender;
uint public last_completed_migration;
modifier restricted() {
require(
msg.sender == owner,
"This function is restricted to the contract's owner"
);
_;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
}
Run Code Online (Sandbox Code Playgroud)
我的松露 config.js 文件
// SPDX-License-Identifier: UNLICENSED
//the version of solidity that is compatible
pragma solidity ^0.8.0;
contract Migrations {
address public owner …Run Code Online (Sandbox Code Playgroud)