diff --git a/clients/client.go b/clients/client.go index 96cd4a3..4a0793f 100644 --- a/clients/client.go +++ b/clients/client.go @@ -1065,9 +1065,9 @@ func (c *Client) EstimateGasWithdraw(ctx context.Context, msg WithdrawalCallMsg) if errBridge != nil { return 0, fmt.Errorf("failed to getBridgeContracts: %w", errBridge) } - callMsg, err = msg.ToZkCallMsg(&contracts.L2SharedBridge) + callMsg, err = msg.ToCallMsg(&contracts.L2SharedBridge) } else { - callMsg, err = msg.ToZkCallMsg(nil) + callMsg, err = msg.ToCallMsg(nil) if err != nil { return 0, err } diff --git a/clients/types.go b/clients/types.go index a530e14..945a8fb 100644 --- a/clients/types.go +++ b/clients/types.go @@ -138,7 +138,7 @@ type WithdrawalCallMsg struct { CustomSignature hexutil.Bytes } -func (m *WithdrawalCallMsg) ToCallMsg(defaultL2Bridge *common.Address) (*ethereum.CallMsg, error) { +func (m *WithdrawalCallMsg) ToL1CallMsg(defaultL2Bridge *common.Address) (*ethereum.CallMsg, error) { if m.Token == utils.L2BaseTokenAddress { ethTokenAbi, err := ethtoken.IEthTokenMetaData.GetAbi() if err != nil { @@ -186,8 +186,8 @@ func (m *WithdrawalCallMsg) ToCallMsg(defaultL2Bridge *common.Address) (*ethereu } } -func (m *WithdrawalCallMsg) ToZkCallMsg(defaultL2Bridge *common.Address) (*types.CallMsg, error) { - msg, err := m.ToCallMsg(defaultL2Bridge) +func (m *WithdrawalCallMsg) ToCallMsg(defaultL2Bridge *common.Address) (*types.CallMsg, error) { + msg, err := m.ToL1CallMsg(defaultL2Bridge) if err != nil { return nil, err }