소스 검색

fix(contract-manager) Small fixes (#2239)

Aditya Arora 10 달 전
부모
커밋
2fe9fb8399

+ 1 - 1
contract_manager/scripts/check_proposal.ts

@@ -195,7 +195,7 @@ async function main() {
             }
 
             const newImplementationCode = await getCodeDigestWithoutAddress(
-              chain.getRpcUrl(),
+              chain.getWeb3(),
               newImplementationAddress
             );
             // this should be the same keccak256 of the deployedCode property generated by truffle

+ 1 - 1
contract_manager/scripts/latency_entropy_with_callback.ts

@@ -55,7 +55,7 @@ async function testLatency(
   const startTime = Date.now();
 
   const fromBlock = requestResponse.blockNumber;
-  const web3 = new Web3(contract.chain.getRpcUrl());
+  const web3 = contract.chain.getWeb3();
   const entropyContract = contract.getContract();
 
   // eslint-disable-next-line no-constant-condition

+ 1 - 1
contract_manager/scripts/list_entropy_contracts.ts

@@ -22,7 +22,7 @@ async function main() {
     if (contract.getChain().isMainnet() === argv.testnet) continue;
     try {
       const provider = await contract.getDefaultProvider();
-      const w3 = new Web3(contract.getChain().getRpcUrl());
+      const w3 = contract.getChain().getWeb3();
       const balance = await w3.eth.getBalance(provider);
       const keeperBalance = await w3.eth.getBalance(keeperAddress);
       let version = "unknown";

+ 1 - 1
contract_manager/scripts/load_test_entropy.ts

@@ -76,7 +76,7 @@ async function main() {
   const contract = findEntropyContract(chain);
   const provider = await contract.getDefaultProvider();
   const fee = await contract.getFee(provider);
-  const web3 = new Web3(contract.chain.getRpcUrl());
+  const web3 = contract.chain.getWeb3();
   const testerContract = new web3.eth.Contract(ABI, argv.testerAddress);
   const { address } = web3.eth.accounts.wallet.add(privateKey);
   const transactionObject = testerContract.methods.batchRequests(