Skip to content

Commit

Permalink
feat(clients): rename TransferCallMsg methods
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Rename `TransferCallMsg.ToCallMsg` to
`TransferCallMsg.ToL1CallMsg` and `TransferCallMsg.ToZkCallMsg` to
`TransferCallMsg.ToCallMsg`.
  • Loading branch information
danijelTxFusion committed Nov 4, 2024
1 parent 4cd0dcf commit 487b902
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ func (c *Client) EstimateGasL1(ctx context.Context, msg types.CallMsg) (uint64,

// EstimateGasTransfer estimates the amount of gas required for a transfer transaction.
func (c *Client) EstimateGasTransfer(ctx context.Context, msg TransferCallMsg) (uint64, error) {
callMsg, err := msg.ToZkCallMsg()
callMsg, err := msg.ToCallMsg()
if err != nil {
return 0, err
}
Expand Down
4 changes: 2 additions & 2 deletions clients/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type TransferCallMsg struct {
CustomSignature hexutil.Bytes
}

func (m *TransferCallMsg) ToCallMsg() (*ethereum.CallMsg, error) {
func (m *TransferCallMsg) ToL1CallMsg() (*ethereum.CallMsg, error) {
var (
value *big.Int
data []byte
Expand Down Expand Up @@ -72,7 +72,7 @@ func (m *TransferCallMsg) ToCallMsg() (*ethereum.CallMsg, error) {
}, nil
}

func (m *TransferCallMsg) ToZkCallMsg() (*types.CallMsg, error) {
func (m *TransferCallMsg) ToCallMsg() (*types.CallMsg, error) {
var (
value *big.Int
data []byte
Expand Down

0 comments on commit 487b902

Please sign in to comment.