Просмотр исходного кода

[evm] Evm runs (#1099)

* Show chain id when checking proposals

* Reduce number of optimizations to 200 in order to defeat the Spurious Dragon
Amin Moghaddam 2 лет назад
Родитель
Сommit
6cebfef1df

+ 3 - 3
contract_manager/scripts/check_proposal.ts

@@ -87,7 +87,7 @@ async function main() {
               JSON.stringify(guardianSet)
             );
             console.log(
-              `Address:\t\t${address}\nproxy digest:\t\t${proxyDigest}\nimplementation digest:\t${implementationDigest} \nguardian set index:\t${currentIndex} \nguardian set:\t\t${guardianSetDigest}`
+              `${chain.getId()}  Address:\t\t${address}\nproxy digest:\t\t${proxyDigest}\nimplementation digest:\t${implementationDigest} \nguardian set index:\t${currentIndex} \nguardian set:\t\t${guardianSetDigest}`
             );
           }
         }
@@ -107,7 +107,7 @@ async function main() {
             const contract = new EvmContract(chain, address);
             const code = await contract.getCodeDigestWithoutAddress();
             // this should be the same keccak256 of the deployedCode property generated by truffle
-            console.log(`Address:${address} digest:${code}`);
+            console.log(`${chain.getId()}  Address:${address} digest:${code}`);
           }
         }
       }
@@ -125,7 +125,7 @@ async function main() {
             const code = await chain.getCode(Number(codeId));
             // this should be the same checksums.txt in our release file
             console.log(
-              `Code Id:${codeId} digest:${createHash("sha256")
+              `${chain.getId()} Code Id:${codeId} digest:${createHash("sha256")
                 .update(code)
                 .digest("hex")}`
             );

+ 1 - 1
target_chains/ethereum/contracts/foundry.toml

@@ -1,7 +1,7 @@
 [profile.default]
 solc_version = '0.8.4'
 optimizer = true
-optimizer_runs = 2000
+optimizer_runs = 200
 src = 'contracts'
 # We put the tests into the forge-test directory (instead of test) so that
 # truffle doesn't try to build them

+ 1 - 1
target_chains/ethereum/contracts/hardhat.config.ts

@@ -107,7 +107,7 @@ module.exports = {
     settings: {
       optimizer: {
         enabled: true,
-        runs: 2000,
+        runs: 200,
       },
     },
   },

+ 1 - 1
target_chains/ethereum/contracts/truffle-config.js

@@ -37,7 +37,7 @@ module.exports = {
       settings: {
         optimizer: {
           enabled: true,
-          runs: 2000,
+          runs: 200,
         },
       },
     },