Fix typo.

This commit is contained in:
Arijit Das 2021-09-22 16:30:10 +05:30
parent 81546618d3
commit f6a6a294bb
3 changed files with 6 additions and 6 deletions

View File

@ -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");

View File

@ -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)

View File

@ -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)