fix_: erc 721 and 1155 fixes

This commit is contained in:
Sale Djenic 2024-05-30 15:03:28 +02:00 committed by saledjenic
parent a135b27980
commit f41dd35d6c
2 changed files with 2 additions and 18 deletions

View File

@ -82,14 +82,6 @@ func (s *ERC1155TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwo
return 0, err
}
ctx := context.Background()
if code, err := ethClient.PendingCodeAt(ctx, token.Address); err != nil {
return 0, err
} else if len(code) == 0 {
return 0, bind.ErrNoCode
}
msg := ethereum.CallMsg{
From: from,
To: &token.Address,
@ -97,7 +89,7 @@ func (s *ERC1155TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwo
Data: input,
}
estimation, err := ethClient.EstimateGas(ctx, msg)
estimation, err := ethClient.EstimateGas(context.Background(), msg)
if err != nil {
return 0, err
}

View File

@ -79,14 +79,6 @@ func (s *ERC721TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwor
return 0, err
}
ctx := context.Background()
if code, err := ethClient.PendingCodeAt(ctx, token.Address); err != nil {
return 0, err
} else if len(code) == 0 {
return 0, bind.ErrNoCode
}
msg := ethereum.CallMsg{
From: from,
To: &token.Address,
@ -94,7 +86,7 @@ func (s *ERC721TransferBridge) EstimateGas(fromNetwork *params.Network, toNetwor
Data: input,
}
estimation, err := ethClient.EstimateGas(ctx, msg)
estimation, err := ethClient.EstimateGas(context.Background(), msg)
if err != nil {
return 0, err
}