Skip to content

Commit

Permalink
fix: provide module and launchpad address
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaisailovic committed Jul 18, 2024
1 parent b8cbc16 commit d0b72f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class SafeSmartAccountLib extends SmartAccountLib {
safeVersion: '1.4.1',
entryPoint: ENTRYPOINT_ADDRESS_V07,
safe4337ModuleAddress: this.SAFE_4337_MODULE_ADDRESS,
//@ts-ignore
erc7579LaunchpadAddress: this.ERC_7579_LAUNCHPAD_ADDRESS,
signer: this.signer
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SendUserOpWithSigantureResponse,
UserOpBuilder
} from './UserOpBuilder'
import { createPublicClient, http } from 'viem'
import { Address, createPublicClient, http } from 'viem'
import { signerToSafeSmartAccount } from 'permissionless/accounts'
import {
createSmartAccountClient,
Expand All @@ -23,6 +23,8 @@ import { getChainById } from '@/utils/ChainUtil'


export class SafeUserOpBuilder implements UserOpBuilder {
protected ERC_7579_LAUNCHPAD_ADDRESS: Address = '0xEBe001b3D534B9B6E2500FB78E67a1A137f561CE'
protected SAFE_4337_MODULE_ADDRESS: Address = '0x3Fdb5BC686e861480ef99A6E3FaAe03c0b9F32e2'
async fillUserOp(params: FillUserOpParams): Promise<FillUserOpResponse> {
const privateKey = generatePrivateKey()
const signer = privateKeyToAccount(privateKey)
Expand Down Expand Up @@ -51,7 +53,10 @@ export class SafeUserOpBuilder implements UserOpBuilder {
entryPoint: ENTRYPOINT_ADDRESS_V07,
signer: signer,
safeVersion: '1.4.1',
address: params.account
address: params.account,
safe4337ModuleAddress: this.SAFE_4337_MODULE_ADDRESS,
//@ts-ignore
erc7579LaunchpadAddress: this.ERC_7579_LAUNCHPAD_ADDRESS,
})

const smartAccountClient = createSmartAccountClient({
Expand Down

0 comments on commit d0b72f3

Please sign in to comment.