From a1781b1eeb224fdde46202458294d7c2d937ce82 Mon Sep 17 00:00:00 2001 From: Arijit Das Date: Wed, 22 Sep 2021 18:23:11 +0530 Subject: [PATCH] Get the block number after the contract is destroyed. --- test/contract/src/index.js | 7 ++++++- test/integration_test.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/contract/src/index.js b/test/contract/src/index.js index 6a15b704..6339a1d9 100644 --- a/test/contract/src/index.js +++ b/test/contract/src/index.js @@ -1,6 +1,7 @@ const fastify = require('fastify')({ logger: true }); const hre = require("hardhat"); + // readiness check fastify.get('/v1/healthz', async (req, reply) => { reply @@ -28,7 +29,11 @@ fastify.get('/v1/destroyContract', async (req, reply) => { const Token = await hre.ethers.getContractFactory("GLDToken"); const token = await Token.attach(addr); - return token.destroy(); + await token.destroy(); + const blockNum = await hre.ethers.provider.getBlockNumber() + return { + blockNumber: blockNum, + } }) fastify.get('/v1/sendEth', async (req, reply) => { diff --git a/test/integration_test.go b/test/integration_test.go index 609f04d4..8e7a8c26 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -393,7 +393,7 @@ var _ = Describe("Integration test", func() { Expect(gethStorage).To(Equal(ipldStorage)) }) - It("get storage after selfdestruct", func() { + It("get storage after self destruct", func() { totalSupplyIndex := "0x2" tx, err := integration.DestroyContract(contract.Address)