我牢固地编写了一个简单的智能合约,并尝试用松露迁移它。
$ truffle migrate
Compiling .\contracts\Election.sol...
Compiling .\contracts\Migrations.sol...
/D/ethereum/electiondemo/contracts/Migrations.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is 0.5.0+commit.1d4f565a.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.24;
^----------------------^
Compilation failed. See above.`enter code here`
Truffle v5.0.0 (core: 5.0.0)
Node v8.11.1
Run Code Online (Sandbox Code Playgroud)
实体版本为0.5.0。请找到以下智能合约代码:
pragma solidity ^0.5.0;
contract Election {
// Read/write candidate
string public candidate;
// Constructor
constructor ( ) public {
candidate = "Candidate 1";
}
}
Run Code Online (Sandbox Code Playgroud) 当我尝试将部署创建为作业类型时,它不会拉取任何映像。
下面是.yaml:
api版本:batch/v1
种类:工作
元数据:
名称:复制品
规格:
退避限制:1
模板:
元数据:
名称:复制品
规格:
重启策略:“从不”
卷:
- 名称:共享卷
持久卷声明:
声明名称:共享 PVC
- 名称:dockersocket
主机路径:
路径:/var/run/docker.sock
容器:
- 名称:复制工件
图片:高山:3.7
imagePullPolicy:始终
命令: ["sh", "-c", "ls -l /shared; rm -rf /shared/*; ls -l /shared; while [ !-d /shared/artifacts ]; do echo 等待工件被复制;睡眠 2;完成;睡眠 10;ls -l /shared/artifacts;“]
体积安装:
- 挂载路径:/共享
名称:共享卷
您能在这里指导一下吗?
问候, 维卡斯