diff --git a/test/contract/src/index.js b/test/contract/src/index.js index b5f865de..6a15b704 100644 --- a/test/contract/src/index.js +++ b/test/contract/src/index.js @@ -22,7 +22,7 @@ fastify.get('/v1/deployContract', async (req, reply) => { } }); -fastify.get('/v1/destoyContract', async (req, reply) => { +fastify.get('/v1/destroyContract', async (req, reply) => { const addr = req.query.addr; const Token = await hre.ethers.getContractFactory("GLDToken"); diff --git a/test/helper.go b/test/helper.go index a79b2679..c17f4283 100644 --- a/test/helper.go +++ b/test/helper.go @@ -14,7 +14,7 @@ type ContractDeployed struct { BlockHash string `json:"blockHash"` } -type ContractDestoyed struct { +type ContractDestroyed struct { TransactionHash string `json:"txHash"` BlockNumber int64 `json:"blockNumber"` BlockHash string `json:"blockHash"` @@ -49,14 +49,14 @@ func DeployContract() (*ContractDeployed, error) { return &contract, nil } -func DestoyContract(addr string) (*ContractDestoyed, error) { - res, err := http.Get(fmt.Sprintf("%s/v1/destoyContract?addr=%s", srvUrl, addr)) +func DestroyContract(addr string) (*ContractDestroyed, error) { + res, err := http.Get(fmt.Sprintf("%s/v1/destroyContract?addr=%s", srvUrl, addr)) if err != nil { return nil, err } defer res.Body.Close() - var data ContractDestoyed + var data ContractDestroyed decoder := json.NewDecoder(res.Body) return &data, decoder.Decode(&data) diff --git a/test/integration_test.go b/test/integration_test.go index 354972fc..609f04d4 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -396,7 +396,7 @@ var _ = Describe("Integration test", func() { It("get storage after selfdestruct", func() { totalSupplyIndex := "0x2" - tx, err := integration.DestoyContract(contract.Address) + tx, err := integration.DestroyContract(contract.Address) Expect(err).ToNot(HaveOccurred()) time.Sleep(sleepInterval)