Skip to content

Commit b6a1392

Browse files
committed
remove todo
1 parent 215ed60 commit b6a1392

File tree

7 files changed

+0
-17
lines changed

7 files changed

+0
-17
lines changed

packages/accounts/src/ambire/AmbireMultiChainSmartAccount.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,12 @@ export class AmbireMultiChainSmartAccount extends BaseMultichainSmartAccount {
9797
if (responses.length !== userOps.length) {
9898
throw new Error('AmbireMultiChainSmartAccount: signUserOps: number of responses does not match number of userOps')
9999
}
100-
// TODO: Adjust the function return value to work with the defined APIs
101100
for (let i = 0; i < userOps.length; i++) {
102101
userOps[i] = responses[i].userOp
103102
}
104103
return userOps
105104
}
106105

107-
// TODO: I don't think this code is correct. The `calls` may contain a mix of Call and FunctionCall elements.
108-
// Must dispatch them to appropriate individual encode functions!
109106
async encodeCalls (chainId: bigint, calls: Array<Call | FunctionCall>): Promise<Hex> {
110107
const hasDynamic = calls.some((call) => isFunctionCall(call))
111108
if (hasDynamic) {
@@ -115,9 +112,6 @@ export class AmbireMultiChainSmartAccount extends BaseMultichainSmartAccount {
115112
}
116113
}
117114

118-
// TODO TODO: We don't actually need a 'viem SmartAccount' instance for Ambire wallet.
119-
// The Ambire wallet should handle everything - encoding, signing, broadcasting etc.
120-
// generated
121115
private async createSmartAccountForChain (chainId: bigint, address: Address): Promise<SmartAccount> {
122116
const self = this
123117

packages/sdk/src/sdk/account/BaseMultichainSmartAccount.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export abstract class BaseMultichainSmartAccount implements IMultiChainSmartAcco
6767
return this.bundlerManager.sendUserOperation(userOp)
6868
}
6969

70-
// TODO: this should only be done once - create an initializer function
7170
async verifyBundlerConfig (chainId: bigint, entryPoints: Address): Promise<void> {
7271
await this.bundlerManager.verifyConfig(chainId, entryPoints)
7372
}

packages/sdk/src/sdk/actions/VoucherRequestAction.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export class VoucherRequestAction implements BaseAction {
3636
const chainId = batch.chainId
3737

3838
//add "approve" for each token we lock
39-
// (TODO: do we want to allow the user to use "indefinite approval" ? it makes it slight cheaper, but requires
40-
// us to check each token, if it already has approval or not)
4139
this.voucherRequest.tokens
4240
.filter(asset => toAddress(chainId, asset.token) !== NATIVE_ETH)
4341
.forEach(asset => {

packages/sdk/src/sdk/builder/BatchBuilder.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ export class BatchBuilder {
212212
calls.length == 0 ? '0x' : this.smartAccount.encodeCalls(chainId, calls)
213213
])
214214

215-
//TODO: get real basefee/priorityFee from network
216215
const { maxFeePerGas, maxPriorityFeePerGas } = await smartAccount.client.extend(publicActions).estimateFeesPerGas()
217216
let userOp = {
218217
chainId,
@@ -221,7 +220,6 @@ export class BatchBuilder {
221220
factory,
222221
factoryData,
223222
callData,
224-
//TODO: calculate gas limits
225223
callGasLimit: 3000000n,
226224
verificationGasLimit: 500000n,
227225
preVerificationGas: 100000n,

packages/sdk/src/sdk/builder/CrossChainExecutor.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ export class CrossChainExecutor {
204204
console.error('Error executing UserOperation:', e)
205205
// Validation failure during sending.
206206
// This indicates a potential issue with the UserOperation.
207-
// TODO: Implement retry or cleanup logic here
208207
batchStatusInfo.status = OperationStatus.Failed
209208
batchStatusInfo.revertReason = e as any
210209
this.callCallback(CallbackType.Failed, callback, batchStatusInfo)
@@ -394,7 +393,6 @@ export class CrossChainExecutor {
394393
for (const outReq of op.batch.outVoucherRequests) {
395394
for (const nextOp of this.batchStatusInfos!) {
396395
if (nextOp.batch.inputVoucherRequests.some(inReq => outReq == inReq)) {
397-
//TODO: need to push the request Ids depending on the actual destination chain
398396
if (!nextOp.requestIds) nextOp.requestIds = []
399397
// add requestIds related to this dest chain:
400398
for (const req of collected.requests ?? []) {
@@ -409,7 +407,6 @@ export class CrossChainExecutor {
409407
}
410408

411409
} else {
412-
//TODO: on-chain execution failed.
413410
// should trigger fallback actions
414411
op.status = OperationStatus.Failed
415412
this.callCallback(CallbackType.Failed, callback, op)
@@ -430,7 +427,6 @@ export class CrossChainExecutor {
430427
}
431428
await new Promise(resolve => setTimeout(resolve, 100))
432429
}
433-
// TODO: throwing on timeout here is a bit too radical. This is a legitimate state we should handle.
434430
throw new Error('timeout: ' + this.timeoutSeconds)
435431
}
436432

packages/sdk/src/sdk/types/IBundlerManager.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export interface SendRawUserOperationResponse {
1313
}
1414

1515
export interface IBundlerManager {
16-
// TODO: alexf: it is not clear why this method is needed, especially with these parameters
1716
verifyConfig (chainId: bigint, entrypoints: Address): Promise<void>
1817

1918
sendUserOperation (userOp: UserOperation): Promise<Hex>

packages/sdk/src/sdk/types/MultichainClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export class MultichainClient {
2121
return Array.from(this.clients.values());
2222
}
2323

24-
//TODO: need a better way to configure all networks
2524
async addClient (client: PublicClient) {
2625
const chainId = BigInt(await client.getChainId())
2726
this.addClientWithChainId(client, chainId)

0 commit comments

Comments
 (0)