diff --git a/src/main/java/console/contract/ConsoleContractImpl.java b/src/main/java/console/contract/ConsoleContractImpl.java index c8176932..864b01de 100644 --- a/src/main/java/console/contract/ConsoleContractImpl.java +++ b/src/main/java/console/contract/ConsoleContractImpl.java @@ -248,17 +248,6 @@ public TransactionResponse deploySolidity( try { boolean isContractParallelAnalysis = false; Version version = Version.V0_8_11; - try { - String flag = - client.getSystemConfigByKey("feature_evm_cancun") - .getSystemConfig() - .getValue(); - if (Integer.parseInt(flag) == 1) { - version = Version.V0_8_26; - } - } catch (Exception e) { - version = Version.V0_8_11; - } if (!inputParams.isEmpty()) { int lastIndexOf = inputParams.lastIndexOf("-p"); if (lastIndexOf != -1) { @@ -1088,20 +1077,10 @@ private String getSolidityAbi(String contractFileName) throws Exception { List defaultOptions = Arrays.asList(ABI, BIN, METADATA); List options = new ArrayList<>(defaultOptions); - Version version = Version.V0_8_11; - try { - String flag = - client.getSystemConfigByKey("feature_evm_cancun").getSystemConfig().getValue(); - if (Integer.parseInt(flag) == 1) { - version = Version.V0_8_26; - } - } catch (Exception e) { - version = Version.V0_8_11; - } logger.debug( "compileSolToBinAndAbi, solc version:{} ,basePath: {}", - version, + Version.V0_8_11, solFile.getParentFile().getCanonicalPath()); SolidityCompiler.Option basePath = new SolidityCompiler.CustomOption( @@ -1114,7 +1093,7 @@ private String getSolidityAbi(String contractFileName) throws Exception { solFile, (client.getCryptoType() == CryptoType.SM_TYPE), true, - version, + Version.V0_8_11, options.toArray(new SolidityCompiler.Option[0])); if (logger.isDebugEnabled()) { diff --git a/src/main/resources/contract/solidity/Asset.sol b/src/main/resources/contract/solidity/Asset.sol index 206c0c37..ffcb980e 100644 --- a/src/main/resources/contract/solidity/Asset.sol +++ b/src/main/resources/contract/solidity/Asset.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; import "./Table.sol"; diff --git a/src/main/resources/contract/solidity/Cast.sol b/src/main/resources/contract/solidity/Cast.sol index 892ef20e..56a83aa1 100644 --- a/src/main/resources/contract/solidity/Cast.sol +++ b/src/main/resources/contract/solidity/Cast.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; abstract contract Cast { diff --git a/src/main/resources/contract/solidity/CastTest.sol b/src/main/resources/contract/solidity/CastTest.sol index 05e7f362..2a2806b4 100644 --- a/src/main/resources/contract/solidity/CastTest.sol +++ b/src/main/resources/contract/solidity/CastTest.sol @@ -1,6 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; - import "./Cast.sol"; contract CastTest { diff --git a/src/main/resources/contract/solidity/Crypto.sol b/src/main/resources/contract/solidity/Crypto.sol index 8e11f6db..cd8a713c 100644 --- a/src/main/resources/contract/solidity/Crypto.sol +++ b/src/main/resources/contract/solidity/Crypto.sol @@ -1,4 +1,3 @@ -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; abstract contract Crypto { diff --git a/src/main/resources/contract/solidity/DelegateCallTest.sol b/src/main/resources/contract/solidity/DelegateCallTest.sol index 9c1b0314..12bcb165 100644 --- a/src/main/resources/contract/solidity/DelegateCallTest.sol +++ b/src/main/resources/contract/solidity/DelegateCallTest.sol @@ -1,4 +1,3 @@ -pragma solidity>=0.6.10 <0.8.20; contract DelegateCallDest { diff --git a/src/main/resources/contract/solidity/EntryWrapper.sol b/src/main/resources/contract/solidity/EntryWrapper.sol index 19fac251..713c3950 100644 --- a/src/main/resources/contract/solidity/EntryWrapper.sol +++ b/src/main/resources/contract/solidity/EntryWrapper.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; import "./Cast.sol"; diff --git a/src/main/resources/contract/solidity/EventSubDemo.sol b/src/main/resources/contract/solidity/EventSubDemo.sol index e08eff8f..df2ecba7 100644 --- a/src/main/resources/contract/solidity/EventSubDemo.sol +++ b/src/main/resources/contract/solidity/EventSubDemo.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity>=0.6.10 <0.8.20; contract EventSubDemo { diff --git a/src/main/resources/contract/solidity/KVTableTest.sol b/src/main/resources/contract/solidity/KVTableTest.sol index 2f249464..50739520 100644 --- a/src/main/resources/contract/solidity/KVTableTest.sol +++ b/src/main/resources/contract/solidity/KVTableTest.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; import "./Table.sol"; diff --git a/src/main/resources/contract/solidity/ShaTest.sol b/src/main/resources/contract/solidity/ShaTest.sol index a573d1bf..074dbdd6 100644 --- a/src/main/resources/contract/solidity/ShaTest.sol +++ b/src/main/resources/contract/solidity/ShaTest.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity>=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; diff --git a/src/main/resources/contract/solidity/Table.sol b/src/main/resources/contract/solidity/Table.sol index 65169a9e..e72f4ca2 100644 --- a/src/main/resources/contract/solidity/Table.sol +++ b/src/main/resources/contract/solidity/Table.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // 该接口文件定义了FISCO BCOS v3.1.0及以前版本的接口,使用时需要将该文件放在合约目录下 // 若要使用FISCO BCOS v3.2.0及以后版本的接口,请使用TableV320.sol,旧合约仍然能在新节点中使用 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; // KeyOrder指定Key的排序规则,字典序和数字序,如果指定为数字序,key只能为数字 diff --git a/src/main/resources/contract/solidity/TableTest.sol b/src/main/resources/contract/solidity/TableTest.sol index 05ba86b4..c7f36e3b 100644 --- a/src/main/resources/contract/solidity/TableTest.sol +++ b/src/main/resources/contract/solidity/TableTest.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; import "./Table.sol"; diff --git a/src/main/resources/contract/solidity/TableTestV320.sol b/src/main/resources/contract/solidity/TableTestV320.sol index e3198c7b..2c71ae4c 100644 --- a/src/main/resources/contract/solidity/TableTestV320.sol +++ b/src/main/resources/contract/solidity/TableTestV320.sol @@ -1,5 +1,4 @@ // SPDX-License-Identifier: Apache-2.0 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; import "./TableV320.sol"; diff --git a/src/main/resources/contract/solidity/TableV320.sol b/src/main/resources/contract/solidity/TableV320.sol index 6c8a70c7..e42b9031 100644 --- a/src/main/resources/contract/solidity/TableV320.sol +++ b/src/main/resources/contract/solidity/TableV320.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // 该接口文件定义了FISCO BCOS v3.2.0及以后版本的接口,使用时需要将该文件放在合约目录下 // 若要使用FISCO BCOS v3.1.0及以前版本的接口,请使用Table.sol,旧合约仍然能在新节点中使用 -pragma solidity >=0.6.10 <0.8.20; pragma experimental ABIEncoderV2; import "./EntryWrapper.sol";