Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ignored --max-fee flag #34

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions cmd/crybapy/factory_payer.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type PayerConfig struct {
Owner string

MaxGas string
MaxFee string

GasTipCap string

Expand Down Expand Up @@ -58,11 +57,6 @@ func RegisterFlags(cmd *cobra.Command, config *PayerConfig) {
"type", "",
payer.Eth.String(),
"Type of the payment (eth,zksync-era,zksync,zkwithdraw,sim,polygon)")
cmd.Flags().StringVarP(
&config.MaxFee,
"max-fee", "",
"",
"Max fee we're willing to consider. Only applies to zksync or zkwithdraw type payment.")
cmd.Flags().StringVarP(
&config.PaymasterAddress,
"paymaster-address", "",
Expand Down Expand Up @@ -110,15 +104,6 @@ func CreatePayer(ctx context.Context, log *zap.Logger, config PayerConfig, nodeA
return nil, err
}

var maxFee *big.Int
if config.MaxFee != "" {
var tmp big.Int
if _, ok := tmp.SetString(config.MaxFee, 10); !ok {
return nil, errs.New("invalid max fee setting")
}
maxFee = &tmp
}

var gasTipCap *big.Int
if config.GasTipCap != "" {
gasTipCap = new(big.Int)
Expand Down Expand Up @@ -174,8 +159,7 @@ func CreatePayer(ctx context.Context, log *zap.Logger, config PayerConfig, nodeA
spenderKey,
int(chainID.Int64()),
paymasterAddress,
paymasterPayload,
maxFee)
paymasterPayload)
if err != nil {
return nil, errs.Wrap(err)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/zksyncera/payer.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ func NewPayer(
key *ecdsa.PrivateKey,
chainID int,
paymasterAddress *common.Address,
paymasterPayload []byte,
maxFee *big.Int) (*Payer, error) {
paymasterPayload []byte) (*Payer, error) {

ethSigner, err := accounts.NewBaseSignerFromRawPrivateKey(key.D.Bytes(), int64(chainID))
if err != nil {
Expand Down
Loading