Fix SQL query to check for empty storage value.

This commit is contained in:
Arijit Das
2021-09-24 15:37:04 +05:30
parent f09f665b11
commit 500bba43b4
7 changed files with 25 additions and 29 deletions
-3
View File
@@ -15,8 +15,6 @@ fastify.get('/v1/deployContract', async (req, reply) => {
const token = await GLDToken.deploy();
await token.deployed();
console.log(`Deployed block ${token.deployTransaction.blockNumber}`)
return {
address: token.address,
txHash: token.deployTransaction.hash,
@@ -33,7 +31,6 @@ fastify.get('/v1/destroyContract', async (req, reply) => {
await token.destroy();
const blockNum = await hre.ethers.provider.getBlockNumber()
console.log(`Destroyed block ${blockNum}`)
return {
blockNumber: blockNum,
-1
View File
@@ -54,7 +54,6 @@ func DestroyContract(addr string) (*ContractDestroyed, error) {
}
defer res.Body.Close()
fmt.Println(res.Body)
var data ContractDestroyed
decoder := json.NewDecoder(res.Body)
+1 -8
View File
@@ -2,7 +2,6 @@ package integration_test
import (
"context"
"fmt"
"math/big"
"time"
@@ -318,8 +317,6 @@ var _ = Describe("Integration test", func() {
contract, contractErr = integration.DeployContract()
erc20TotalSupply, bigIntResult = new(big.Int).SetString("1000000000000000000000", 10)
fmt.Printf("Deployed address: %d\n", contract.BlockNumber)
time.Sleep(sleepInterval)
})
@@ -396,7 +393,7 @@ var _ = Describe("Integration test", func() {
Expect(gethStorage).To(Equal(ipldStorage))
})
FIt("get storage after self destruct", func() {
It("get storage after self destruct", func() {
totalSupplyIndex := "0x2"
tx, err := integration.DestroyContract(contract.Address)
@@ -404,10 +401,6 @@ var _ = Describe("Integration test", func() {
time.Sleep(sleepInterval)
fmt.Printf("Destroyed address: %d\n", tx.BlockNumber)
fmt.Printf("Contract Address: %s \n", contract.Address)
gethStorage1, err := gethClient.StorageAt(ctx, common.HexToAddress(contract.Address), common.HexToHash(totalSupplyIndex), big.NewInt(tx.BlockNumber-1))
Expect(err).ToNot(HaveOccurred())
gethStorage2, err := gethClient.StorageAt(ctx, common.HexToAddress(contract.Address), common.HexToHash(totalSupplyIndex), big.NewInt(tx.BlockNumber))