Skip to content

Commit

Permalink
mainnet_v1: redeploy BlockInfo contract (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flouse authored Oct 24, 2023
1 parent a8705c0 commit c87f098
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/config/mainnet-contracts.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"BlockInfo": "0xfB243051AE5cB157240a3bA79678e1DF8e6EFDb7"
"BlockInfo": "0xE531b37bC28A171dce51EfD3710b56aa813167FB"
}
6 changes: 4 additions & 2 deletions contracts/test/BlockInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ describe("BlockInfo Contract", function () {
// should be equal to zero
expect(eventBlockHash).to.be.equal("0x0000000000000000000000000000000000000000000000000000000000000000")


// Triggering the event for the previous block hash
const prevTx = await contract.getFunction("executePreviousBlockHash").send().then(tx => tx.wait());
const prevTx = await contract.getFunction("executePreviousBlockHash").send().then(tx => {
console.log("call BlockInfo.executePreviousBlockHash, tx_hash, :", tx.hash);
return tx.wait()
});

const prevTxBlockNumber = prevTx.blockNumber - 1;
const prevTxBlockHash = (await ethers.provider.getBlock(prevTxBlockNumber)).hash;
Expand Down

0 comments on commit c87f098

Please sign in to comment.