Fix typo.
This commit is contained in:
parent
81546618d3
commit
f6a6a294bb
@ -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 addr = req.query.addr;
|
||||||
|
|
||||||
const Token = await hre.ethers.getContractFactory("GLDToken");
|
const Token = await hre.ethers.getContractFactory("GLDToken");
|
||||||
|
@ -14,7 +14,7 @@ type ContractDeployed struct {
|
|||||||
BlockHash string `json:"blockHash"`
|
BlockHash string `json:"blockHash"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ContractDestoyed struct {
|
type ContractDestroyed struct {
|
||||||
TransactionHash string `json:"txHash"`
|
TransactionHash string `json:"txHash"`
|
||||||
BlockNumber int64 `json:"blockNumber"`
|
BlockNumber int64 `json:"blockNumber"`
|
||||||
BlockHash string `json:"blockHash"`
|
BlockHash string `json:"blockHash"`
|
||||||
@ -49,14 +49,14 @@ func DeployContract() (*ContractDeployed, error) {
|
|||||||
return &contract, nil
|
return &contract, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func DestoyContract(addr string) (*ContractDestoyed, error) {
|
func DestroyContract(addr string) (*ContractDestroyed, error) {
|
||||||
res, err := http.Get(fmt.Sprintf("%s/v1/destoyContract?addr=%s", srvUrl, addr))
|
res, err := http.Get(fmt.Sprintf("%s/v1/destroyContract?addr=%s", srvUrl, addr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer res.Body.Close()
|
defer res.Body.Close()
|
||||||
|
|
||||||
var data ContractDestoyed
|
var data ContractDestroyed
|
||||||
decoder := json.NewDecoder(res.Body)
|
decoder := json.NewDecoder(res.Body)
|
||||||
|
|
||||||
return &data, decoder.Decode(&data)
|
return &data, decoder.Decode(&data)
|
||||||
|
@ -396,7 +396,7 @@ var _ = Describe("Integration test", func() {
|
|||||||
It("get storage after selfdestruct", func() {
|
It("get storage after selfdestruct", func() {
|
||||||
totalSupplyIndex := "0x2"
|
totalSupplyIndex := "0x2"
|
||||||
|
|
||||||
tx, err := integration.DestoyContract(contract.Address)
|
tx, err := integration.DestroyContract(contract.Address)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
time.Sleep(sleepInterval)
|
time.Sleep(sleepInterval)
|
||||||
|
Loading…
Reference in New Issue
Block a user