fix_: erc 721 and 1155 fixes
This commit is contained in:
parent
a135b27980
commit
f41dd35d6c
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue