Skip to content

Commit d2da7f6

Browse files
Updated contract addresses across all chains (#11)
* Updated contract addresses across all chains and implementation of installModule/uninstallModule functions * Update contract addresses on XDC Testnet * Update Networks details
1 parent 12d60fd commit d2da7f6

File tree

97 files changed

+194
-4832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+194
-4832
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
2-
## [2.0.0] - 2024-06-04
2+
## [1.0.1] - 2024-06-13
3+
### New
4+
- The addresses of the contracts have been updated on all chains.
5+
### Changes
6+
- The `installModule` and `uninstallModule` functions have been enhanced to allow direct module installation and uninstallation from within the functions, providing a return of the UserOp Hash.
7+
- The `DataUtils` module has been removed from the code.
8+
- The code supporting ZeroDev and SimpleAccount has been removed.
9+
10+
## [1.0.0] - 2024-06-04
311
### New
412
- Added support for EP7.0 and Etherspot's Modular accounts
513
- Added `installModule` function to install module
File renamed without changes.

examples/05-get-account-balances.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.
File renamed without changes.

examples/06-transaction.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.

examples/07-transactions.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/08-nft-list.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.
File renamed without changes.

examples/09-exchange.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

examples/10-advance-routes-lifi.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

examples/14-install-module.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { EtherspotBundler, ModularSdk } from '../src';
2+
import * as dotenv from 'dotenv';
3+
import { MODULE_TYPE } from '../src/sdk/common';
4+
5+
dotenv.config();
6+
7+
async function main() {
8+
const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9';
9+
10+
// initializating sdk...
11+
const modularSdk = new ModularSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
12+
13+
console.log('address: ', modularSdk.state.EOAAddress);
14+
15+
// get address of EtherspotWallet
16+
const address: string = await modularSdk.getCounterFactualAddress();
17+
18+
console.log('\x1b[33m%s\x1b[0m', `EtherspotWallet address: ${address}`);
19+
20+
const uoHash = await modularSdk.installModule(MODULE_TYPE.VALIDATOR, '0x1417aDC5308a32265E0fA0690ea1408FFA62F37c');
21+
console.log(`UserOpHash: ${uoHash}`);
22+
}
23+
24+
main()
25+
.catch(console.error)
26+
.finally(() => process.exit());

examples/14-zeroDev-address.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

examples/15-simpleAccount-address.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

examples/15-uninstall-module.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { ethers } from 'ethers';
2+
import { EtherspotBundler, ModularSdk } from '../src';
3+
import * as dotenv from 'dotenv';
4+
import { MODULE_TYPE } from '../src/sdk/common';
5+
6+
dotenv.config();
7+
8+
async function main() {
9+
const bundlerApiKey = 'eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6IjMxMDZiOGY2NTRhZTRhZTM4MGVjYjJiN2Q2NDMzMjM4IiwiaCI6Im11cm11cjEyOCJ9';
10+
11+
// initializating sdk...
12+
const modularSdk = new ModularSdk({ privateKey: process.env.WALLET_PRIVATE_KEY }, { chainId: Number(process.env.CHAIN_ID), bundlerProvider: new EtherspotBundler(Number(process.env.CHAIN_ID), bundlerApiKey) })
13+
14+
console.log('address: ', modularSdk.state.EOAAddress);
15+
16+
// get address of EtherspotWallet
17+
const address: string = await modularSdk.getCounterFactualAddress();
18+
19+
console.log('\x1b[33m%s\x1b[0m', `EtherspotWallet address: ${address}`);
20+
21+
const deInitData = ethers.utils.defaultAbiCoder.encode(
22+
["address", "bytes"],
23+
['0x0000000000000000000000000000000000000001', '0x00']
24+
);
25+
26+
const uoHash = await modularSdk.uninstallModule(MODULE_TYPE.VALIDATOR, '0x1417aDC5308a32265E0fA0690ea1408FFA62F37c', deInitData);
27+
console.log(`UserOpHash: ${uoHash}`);
28+
}
29+
30+
main()
31+
.catch(console.error)
32+
.finally(() => process.exit());

examples/17-token-list.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/18-exchange-rates.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

examples/25-get-quotes.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)