Skip to content

Commit 582f862

Browse files
Fix lint errors: range over integer, missing types in composite literals, unused variable, and unused parameter (#233)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris Li <chris.li.2046@gmail.com>
1 parent 63bc1de commit 582f862

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

core/taskengine/engine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func TestListTasksPagination(t *testing.T) {
145145
tr2.SmartWalletAddress = "0x961d2DD008960A9777571D78D21Ec9C3E5c6020c"
146146
n.CreateTask(testutil.TestUser1(), tr2)
147147

148-
for i := range 20 {
148+
for i := 0; i < 20; i++ {
149149
tr3 := testutil.RestTask()
150150
// salt 6789
151151
tr3.Name = fmt.Sprintf("t3_%d", i)

pkg/erc4337/preset/builder.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,8 @@ func BuildUserOpWithPaymaster(
316316
// Define ABI types for timestamps
317317
uint48Type, _ := abi.NewType("uint48", "", nil)
318318
timestampArgs := abi.Arguments{
319-
{Type: uint48Type},
320-
{Type: uint48Type},
319+
abi.Argument{Type: uint48Type},
320+
abi.Argument{Type: uint48Type},
321321
}
322322

323323
// Pack timestamps according to ABI encoding rules

pkg/erc4337/userop/object.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ func (op *UserOperation) Pack() []byte {
159159
// PackForSignature returns a minimal message of the userOp. This can be used to generate a userOpHash.
160160
func (op *UserOperation) PackForSignature() []byte {
161161
args := abi.Arguments{
162-
{Name: "sender", Type: address},
163-
{Name: "nonce", Type: uint256},
164-
{Name: "hashInitCode", Type: bytes32},
165-
{Name: "hashCallData", Type: bytes32},
166-
{Name: "callGasLimit", Type: uint256},
167-
{Name: "verificationGasLimit", Type: uint256},
168-
{Name: "preVerificationGas", Type: uint256},
169-
{Name: "maxFeePerGas", Type: uint256},
170-
{Name: "maxPriorityFeePerGas", Type: uint256},
171-
{Name: "hashPaymasterAndData", Type: bytes32},
162+
abi.Argument{Name: "sender", Type: address},
163+
abi.Argument{Name: "nonce", Type: uint256},
164+
abi.Argument{Name: "hashInitCode", Type: bytes32},
165+
abi.Argument{Name: "hashCallData", Type: bytes32},
166+
abi.Argument{Name: "callGasLimit", Type: uint256},
167+
abi.Argument{Name: "verificationGasLimit", Type: uint256},
168+
abi.Argument{Name: "preVerificationGas", Type: uint256},
169+
abi.Argument{Name: "maxFeePerGas", Type: uint256},
170+
abi.Argument{Name: "maxPriorityFeePerGas", Type: uint256},
171+
abi.Argument{Name: "hashPaymasterAndData", Type: bytes32},
172172
}
173173
packed, _ := args.Pack(
174174
op.Sender,

pkg/graphql/graphql.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func NewClient(endpoint string, log func(s string), opts ...ClientOption) (*Clie
2525
client := &Client{
2626
endpoint: endpoint,
2727
restyClient: resty.New(),
28-
Log: func(string) {},
28+
Log: log,
2929
}
3030

3131
for _, opt := range opts {

0 commit comments

Comments
 (0)