Skip to content

Commit 4c3615a

Browse files
committed
Update NetworkConfig
- Updated PulseConfig to no longer use hookMultiPlexer addresses as taking from NetworkConfigs and made credibleAccountModule and resourceLockValidator addresses mandatory - Removed credibleAccountModule and resourceLockValidator fields from NetworkConfig as these will be passed in via intent-sdk - Updated pulse functions to match this. - Updated install-latest-pulse-modules example to match this.
1 parent a70c9b6 commit 4c3615a

File tree

5 files changed

+56
-107
lines changed

5 files changed

+56
-107
lines changed

examples/pulse/install-latest-pulse-modules.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ async function main() {
1717
const modularSdk = generateModularSDKInstance(process.env.WALLET_PRIVATE_KEY as string, chainId, bundlerApiKey);
1818

1919
const networkConfig: NetworkConfig = Networks[chainId];
20-
const V1_HOOK_MULTIPLEXER_ADDRESS = '0xDcA918dd23456d321282DF9507F6C09A50522136';
21-
const HOOK_MULTIPLEXER_ADDRESS = networkConfig.contracts.hookMultiPlexer as Hex;
22-
const RESOURCE_LOCK_VALIDATOR_ADDRESS = networkConfig.contracts.resourceLockValidator as Hex;
23-
const CREDIBLE_ACCOUNT_MODULE_ADDRESS = networkConfig.contracts.credibleAccountModule as Hex;
20+
const RESOURCE_LOCK_VALIDATOR_ADDRESS = '0x08B42e03c1beC06caa3811F503EBF2D58CaccE94' as Hex;
21+
const CREDIBLE_ACCOUNT_MODULE_ADDRESS = '0xc34D2E2D9Fa0aDbCd801F13563A1423858751A12' as Hex;
2422

2523
// Get counterfactual of ModularEtherspotWallet...
2624
const address: Hex = (await modularSdk.getCounterFactualAddress()) as Hex;
@@ -39,11 +37,9 @@ async function main() {
3937
try {
4038
// Install the complete Pulse ecosystem using the new Pulse class
4139
const uoHash = await modularSdk.pulse.installPulseModules({
42-
hookMultiplexerAddress: HOOK_MULTIPLEXER_ADDRESS,
4340
credibleAccountModuleAddress: CREDIBLE_ACCOUNT_MODULE_ADDRESS,
4441
resourceLockValidatorAddress: RESOURCE_LOCK_VALIDATOR_ADDRESS,
4542
uninstallOldHookMultiplexer: false,
46-
// oldHookMultiplexerAddress: V1_HOOK_MULTIPLEXER_ADDRESS,
4743
});
4844

4945
console.log(`PulseSetup UserOpHash: ${uoHash}`);
@@ -63,15 +59,14 @@ async function main() {
6359

6460
// Verify installation
6561
const installationStatus = await modularSdk.pulse.isPulseModulesInstalled({
66-
hookMultiplexerAddress: HOOK_MULTIPLEXER_ADDRESS,
6762
credibleAccountModuleAddress: CREDIBLE_ACCOUNT_MODULE_ADDRESS,
6863
resourceLockValidatorAddress: RESOURCE_LOCK_VALIDATOR_ADDRESS,
6964
});
7065

7166
console.log('\x1b[33m%s\x1b[0m', 'Installation Status:', installationStatus);
7267

7368
if (
74-
installationStatus.hookMultiplexer &&
69+
installationStatus.hookMultiPlexer &&
7570
installationStatus.credibleAccountValidator &&
7671
installationStatus.resourceLockValidator
7772
) {

0 commit comments

Comments
 (0)