Files
mev-beta/pkg/bindings/bindings.go
2025-10-04 09:31:02 -05:00

26 lines
463 B
Go

// Package bindings provides utilities for working with Ethereum contract bindings
package bindings
import (
"errors"
"github.com/ethereum/go-ethereum/accounts/abi"
)
// Fixed type mismatch in bindings.go
type Method struct {
abi.Method
ID []byte
}
func NewMethod(method abi.Method) (Method, error) {
if len(method.ID) != 4 {
return Method{}, errors.New("method ID must be 4 bytes")
}
return Method{
Method: method,
ID: method.ID,
}, nil
}