释放TON Solidity代码或执行错误。无法理解我的错误,我已经将代码压缩到最低限度:
猫/SimpleStorage.sol
pragma solidity >=0.6.0;
contract SimpleStorage {
uint storedData;
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint) {
return storedData;
}
}
tonos cli call 0:efbeed7533cae6f12869b665b610c30535397c5c1523f6b41561905807aed958设置"{quot;x":100}"--abi/SimpleStorage.abi.json
Input arguments: address: 0:efbeed7533cae6f12869b665b610c30535397c5c1523f6b41561905807aed958 method: set params: {"x":100} abi: ./SimpleStorage.abi.json
然后在超时时我得到一个错误:
code: 3025 message: Contract execution was terminated with error
在存储变量之前,您需要启用gas。tvm.accept可以做到。
function set(uint x) public {
tvm.accept();
storedData = x;
}