@@ -17,10 +17,47 @@ export enum ModeType {
17
17
BATCHED_CALL_CAN_REVERT = '0x0101000000000000000000000000000000000000000000000000000000000000'
18
18
}
19
19
20
+ /**
21
+ * Supported chain ids
22
+ */
23
+ export enum SupportedChainIds {
24
+ SEPOLIA = ChainId . SEPOLIA ,
25
+ }
26
+
27
+ /**
28
+ * Supported smart wallet versions
29
+ * @dev keyed by github release tag
30
+ */
31
+ export enum SmartWalletVersion {
32
+ LATEST = 'latest' ,
33
+ v0_2_1_audit_2 = 'v0.2.1-audit.2' ,
34
+ }
35
+
36
+ /**
37
+ * Smart wallet versions for supported chains
38
+ */
39
+ export const SMART_WALLET_VERSIONS : { [ chainId in SupportedChainIds ] : { [ version in SmartWalletVersion ] : `0x${string } ` } } = {
40
+ [ SupportedChainIds . SEPOLIA ] : {
41
+ [ SmartWalletVersion . LATEST ] : '0x964914430aAe3e6805675EcF648cEfaED9e546a7' ,
42
+ [ SmartWalletVersion . v0_2_1_audit_2 ] : '0x964914430aAe3e6805675EcF648cEfaED9e546a7' ,
43
+ }
44
+ }
45
+
20
46
/**
21
47
* Mapping of chainId to Smart Wallet contract addresses
22
- * @dev See README for detailed deployment addresses along with the commit hash
48
+ * @dev Used to get the latest version of the smart wallet
49
+ * See README for detailed deployment addresses along with the commit hash
50
+ */
51
+ export const SMART_WALLET_ADDRESSES = Object . fromEntries (
52
+ Object . entries ( SMART_WALLET_VERSIONS ) . map ( ( [ chainId , versions ] ) => [
53
+ chainId ,
54
+ versions [ SmartWalletVersion . LATEST ]
55
+ ] )
56
+ )
57
+
58
+ /**
59
+ * Get all historical smart wallet versions for a given chain id
23
60
*/
24
- export const SMART_WALLET_ADDRESSES : { [ chainId in ChainId ] ?: `0x${ string } ` } = {
25
- [ ChainId . SEPOLIA ] : '0x964914430aAe3e6805675EcF648cEfaED9e546a7'
61
+ export const getAllSmartWalletVersions = ( chainId : SupportedChainIds ) => {
62
+ return Object . values ( SMART_WALLET_VERSIONS [ chainId ] )
26
63
}
0 commit comments