forked from cerc-io/ipld-eth-server
Get the block number after the contract is destroyed.
This commit is contained in:
parent
f6a6a294bb
commit
a1781b1eeb
@ -1,6 +1,7 @@
|
|||||||
const fastify = require('fastify')({ logger: true });
|
const fastify = require('fastify')({ logger: true });
|
||||||
const hre = require("hardhat");
|
const hre = require("hardhat");
|
||||||
|
|
||||||
|
|
||||||
// readiness check
|
// readiness check
|
||||||
fastify.get('/v1/healthz', async (req, reply) => {
|
fastify.get('/v1/healthz', async (req, reply) => {
|
||||||
reply
|
reply
|
||||||
@ -28,7 +29,11 @@ fastify.get('/v1/destroyContract', async (req, reply) => {
|
|||||||
const Token = await hre.ethers.getContractFactory("GLDToken");
|
const Token = await hre.ethers.getContractFactory("GLDToken");
|
||||||
const token = await Token.attach(addr);
|
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) => {
|
fastify.get('/v1/sendEth', async (req, reply) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user