@safe-global/safe-deployments 1.37.0 → 1.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +150 -31
  2. package/dist/accessors.d.ts +14 -1
  3. package/dist/accessors.js +19 -11
  4. package/dist/assets/v1.0.0/gnosis_safe.json +479 -103
  5. package/dist/assets/v1.0.0/proxy_factory.json +11 -6
  6. package/dist/assets/v1.1.1/default_callback_handler.json +14 -9
  7. package/dist/assets/v1.1.1/gnosis_safe.json +14 -9
  8. package/dist/assets/v1.1.1/multi_send.json +14 -9
  9. package/dist/assets/v1.1.1/proxy_factory.json +14 -9
  10. package/dist/assets/v1.2.0/gnosis_safe.json +14 -9
  11. package/dist/assets/v1.3.0/compatibility_fallback_handler.json +259 -235
  12. package/dist/assets/v1.3.0/create_call.json +259 -235
  13. package/dist/assets/v1.3.0/gnosis_safe.json +259 -235
  14. package/dist/assets/v1.3.0/gnosis_safe_l2.json +259 -235
  15. package/dist/assets/v1.3.0/multi_send.json +259 -235
  16. package/dist/assets/v1.3.0/multi_send_call_only.json +259 -235
  17. package/dist/assets/v1.3.0/proxy_factory.json +259 -235
  18. package/dist/assets/v1.3.0/sign_message_lib.json +260 -236
  19. package/dist/assets/v1.3.0/simulate_tx_accessor.json +259 -235
  20. package/dist/assets/v1.4.1/compatibility_fallback_handler.json +119 -108
  21. package/dist/assets/v1.4.1/create_call.json +119 -108
  22. package/dist/assets/v1.4.1/multi_send.json +119 -108
  23. package/dist/assets/v1.4.1/multi_send_call_only.json +119 -108
  24. package/dist/assets/v1.4.1/safe.json +119 -108
  25. package/dist/assets/v1.4.1/safe_l2.json +119 -108
  26. package/dist/assets/v1.4.1/safe_proxy_factory.json +120 -109
  27. package/dist/assets/v1.4.1/sign_message_lib.json +120 -109
  28. package/dist/assets/v1.4.1/simulate_tx_accessor.json +119 -108
  29. package/dist/deployments.d.ts +12 -0
  30. package/dist/deployments.js +71 -0
  31. package/dist/factories.d.ts +12 -1
  32. package/dist/factories.js +17 -13
  33. package/dist/handler.d.ts +29 -1
  34. package/dist/handler.js +55 -24
  35. package/dist/libs.d.ts +45 -1
  36. package/dist/libs.js +62 -32
  37. package/dist/safes.d.ts +23 -3
  38. package/dist/safes.js +32 -21
  39. package/dist/types.d.ts +37 -2
  40. package/dist/utils.d.ts +12 -2
  41. package/dist/utils.js +61 -9
  42. package/package.json +18 -19
  43. package/src/__tests__/assets/v1/v1.0.0/gnosis_safe.json +796 -0
  44. package/src/__tests__/assets/v1/v1.0.0/proxy_factory.json +111 -0
  45. package/src/__tests__/assets/v1/v1.1.1/create_and_add_modules.json +59 -0
  46. package/src/__tests__/assets/v1/v1.1.1/create_call.json +90 -0
  47. package/src/__tests__/assets/v1/v1.1.1/default_callback_handler.json +212 -0
  48. package/src/__tests__/assets/v1/v1.1.1/gnosis_safe.json +1001 -0
  49. package/src/__tests__/assets/v1/v1.1.1/multi_send.json +45 -0
  50. package/src/__tests__/assets/v1/v1.1.1/proxy_factory.json +191 -0
  51. package/src/__tests__/assets/v1/v1.2.0/gnosis_safe.json +1022 -0
  52. package/src/__tests__/assets/v1/v1.3.0/compatibility_fallback_handler.json +588 -0
  53. package/src/__tests__/assets/v1/v1.3.0/create_call.json +331 -0
  54. package/src/__tests__/assets/v1/v1.3.0/gnosis_safe.json +1296 -0
  55. package/src/__tests__/assets/v1/v1.3.0/gnosis_safe_l2.json +1401 -0
  56. package/src/__tests__/assets/v1/v1.3.0/multi_send.json +283 -0
  57. package/src/__tests__/assets/v1/v1.3.0/multi_send_call_only.json +278 -0
  58. package/src/__tests__/assets/v1/v1.3.0/proxy_factory.json +426 -0
  59. package/src/__tests__/assets/v1/v1.3.0/sign_message_lib.json +310 -0
  60. package/src/__tests__/assets/v1/v1.3.0/simulate_tx_accessor.json +314 -0
  61. package/src/__tests__/assets/v1/v1.4.1/compatibility_fallback_handler.json +447 -0
  62. package/src/__tests__/assets/v1/v1.4.1/create_call.json +192 -0
  63. package/src/__tests__/assets/v1/v1.4.1/multi_send.json +144 -0
  64. package/src/__tests__/assets/v1/v1.4.1/multi_send_call_only.json +139 -0
  65. package/src/__tests__/assets/v1/v1.4.1/safe.json +1123 -0
  66. package/src/__tests__/assets/v1/v1.4.1/safe_l2.json +1228 -0
  67. package/src/__tests__/assets/v1/v1.4.1/safe_proxy_factory.json +263 -0
  68. package/src/__tests__/assets/v1/v1.4.1/sign_message_lib.json +171 -0
  69. package/src/__tests__/assets/v1/v1.4.1/simulate_tx_accessor.json +175 -0
  70. package/src/__tests__/assets.test.ts +101 -38
  71. package/src/__tests__/factories.test.ts +3 -3
  72. package/src/__tests__/handler.test.ts +5 -5
  73. package/src/__tests__/libs.test.ts +9 -9
  74. package/src/__tests__/safes.test.ts +9 -12
  75. package/src/__tests__/utils.test.ts +421 -0
  76. package/src/accessors.ts +21 -12
  77. package/src/assets/v1.0.0/gnosis_safe.json +479 -103
  78. package/src/assets/v1.0.0/proxy_factory.json +11 -6
  79. package/src/assets/v1.1.1/create_and_add_modules.json +19 -10
  80. package/src/assets/v1.1.1/create_call.json +14 -9
  81. package/src/assets/v1.1.1/default_callback_handler.json +14 -9
  82. package/src/assets/v1.1.1/gnosis_safe.json +14 -9
  83. package/src/assets/v1.1.1/multi_send.json +14 -9
  84. package/src/assets/v1.1.1/proxy_factory.json +14 -9
  85. package/src/assets/v1.2.0/gnosis_safe.json +14 -9
  86. package/src/assets/v1.3.0/compatibility_fallback_handler.json +259 -235
  87. package/src/assets/v1.3.0/create_call.json +259 -235
  88. package/src/assets/v1.3.0/gnosis_safe.json +259 -235
  89. package/src/assets/v1.3.0/gnosis_safe_l2.json +259 -235
  90. package/src/assets/v1.3.0/multi_send.json +259 -235
  91. package/src/assets/v1.3.0/multi_send_call_only.json +259 -235
  92. package/src/assets/v1.3.0/proxy_factory.json +259 -235
  93. package/src/assets/v1.3.0/sign_message_lib.json +260 -236
  94. package/src/assets/v1.3.0/simulate_tx_accessor.json +259 -235
  95. package/src/assets/v1.4.1/compatibility_fallback_handler.json +119 -108
  96. package/src/assets/v1.4.1/create_call.json +119 -108
  97. package/src/assets/v1.4.1/multi_send.json +119 -108
  98. package/src/assets/v1.4.1/multi_send_call_only.json +119 -108
  99. package/src/assets/v1.4.1/safe.json +119 -108
  100. package/src/assets/v1.4.1/safe_l2.json +119 -108
  101. package/src/assets/v1.4.1/safe_proxy_factory.json +120 -109
  102. package/src/assets/v1.4.1/sign_message_lib.json +120 -109
  103. package/src/assets/v1.4.1/simulate_tx_accessor.json +119 -108
  104. package/src/deployments.ts +90 -0
  105. package/src/factories.ts +19 -14
  106. package/src/handler.ts +62 -26
  107. package/src/index.ts +6 -6
  108. package/src/libs.ts +69 -35
  109. package/src/safes.ts +34 -22
  110. package/src/types.ts +86 -10
  111. package/src/utils.ts +105 -12
  112. package/src/__tests__/utilts.test.ts +0 -385
@@ -1,116 +1,127 @@
1
1
  {
2
- "defaultAddress": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
3
2
  "released": true,
4
3
  "contractName": "SimulateTxAccessor",
5
4
  "version": "1.4.1",
5
+ "deployments": {
6
+ "canonical": {
7
+ "address": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
8
+ "codeHash": "0x91f82615581fc73b190b83d72e883608b25e392f72322035df1b13d51766cf8d"
9
+ }
10
+ },
6
11
  "networkAddresses": {
7
- "1": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
8
- "5": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
9
- "10": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
10
- "25": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
11
- "31": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
12
- "40": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
13
- "41": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
14
- "56": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
15
- "71": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
16
- "97": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
17
- "100": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
18
- "137": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
19
- "155": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
20
- "169": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
21
- "250": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
22
- "252": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
23
- "255": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
24
- "336": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
25
- "338": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
26
- "369": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
27
- "690": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
28
- "919": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
29
- "1030": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
30
- "1101": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
31
- "1111": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
32
- "1112": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
33
- "1135": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
34
- "1284": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
35
- "1285": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
36
- "1287": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
37
- "1329": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
38
- "1442": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
39
- "1625": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
40
- "1729": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
41
- "2000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
42
- "2039": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
43
- "2358": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
44
- "2810": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
45
- "3636": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
46
- "3776": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
47
- "4002": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
48
- "4157": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
49
- "4202": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
50
- "4337": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
51
- "4653": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
52
- "5000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
53
- "5003": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
54
- "6001": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
55
- "7000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
56
- "7001": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
57
- "7171": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
58
- "7560": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
59
- "7771": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
60
- "8192": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
61
- "8194": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
62
- "8453": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
63
- "9001": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
64
- "10242": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
65
- "10243": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
66
- "11235": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
67
- "13337": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
68
- "17000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
69
- "17069": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
70
- "18233": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
71
- "23294": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
72
- "23295": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
73
- "32769": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
74
- "33101": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
75
- "34443": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
76
- "42161": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
77
- "42220": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
78
- "43114": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
79
- "54211": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
80
- "59140": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
81
- "59141": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
82
- "59144": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
83
- "80001": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
84
- "80085": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
85
- "81457": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
86
- "84531": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
87
- "84532": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
88
- "105105": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
89
- "111188": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
90
- "167000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
91
- "167009": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
92
- "205205": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
93
- "444444": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
94
- "534351": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
95
- "534352": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
96
- "555666": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
97
- "713715": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
98
- "6038361": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
99
- "7225878": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
100
- "7777777": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
101
- "11155111": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
102
- "11155420": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
103
- "94204209": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
104
- "111557560": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
105
- "123420111": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
106
- "168587773": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
107
- "666666666": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
108
- "999999999": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
109
- "1313161554": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
110
- "1313161555": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
111
- "1666600000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
112
- "1666700000": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199",
113
- "88153591557": "0x3d4BA2E0884aa488718476ca2FB8Efc291A46199"
12
+ "1": "canonical",
13
+ "5": "canonical",
14
+ "10": "canonical",
15
+ "25": "canonical",
16
+ "31": "canonical",
17
+ "40": "canonical",
18
+ "41": "canonical",
19
+ "56": "canonical",
20
+ "71": "canonical",
21
+ "97": "canonical",
22
+ "100": "canonical",
23
+ "137": "canonical",
24
+ "155": "canonical",
25
+ "169": "canonical",
26
+ "250": "canonical",
27
+ "252": "canonical",
28
+ "255": "canonical",
29
+ "336": "canonical",
30
+ "338": "canonical",
31
+ "369": "canonical",
32
+ "480": "canonical",
33
+ "530": "canonical",
34
+ "592": "canonical",
35
+ "690": "canonical",
36
+ "919": "canonical",
37
+ "1030": "canonical",
38
+ "1101": "canonical",
39
+ "1111": "canonical",
40
+ "1112": "canonical",
41
+ "1135": "canonical",
42
+ "1284": "canonical",
43
+ "1285": "canonical",
44
+ "1287": "canonical",
45
+ "1329": "canonical",
46
+ "1337": "canonical",
47
+ "1442": "canonical",
48
+ "1625": "canonical",
49
+ "1729": "canonical",
50
+ "2000": "canonical",
51
+ "2039": "canonical",
52
+ "2358": "canonical",
53
+ "2810": "canonical",
54
+ "3636": "canonical",
55
+ "3776": "canonical",
56
+ "4002": "canonical",
57
+ "4157": "canonical",
58
+ "4202": "canonical",
59
+ "4337": "canonical",
60
+ "4653": "canonical",
61
+ "5000": "canonical",
62
+ "5003": "canonical",
63
+ "6001": "canonical",
64
+ "6322": "canonical",
65
+ "7000": "canonical",
66
+ "7001": "canonical",
67
+ "7171": "canonical",
68
+ "7560": "canonical",
69
+ "7771": "canonical",
70
+ "8192": "canonical",
71
+ "8194": "canonical",
72
+ "8453": "canonical",
73
+ "9001": "canonical",
74
+ "10242": "canonical",
75
+ "10243": "canonical",
76
+ "11235": "canonical",
77
+ "13337": "canonical",
78
+ "17000": "canonical",
79
+ "17069": "canonical",
80
+ "18233": "canonical",
81
+ "23294": "canonical",
82
+ "23295": "canonical",
83
+ "32769": "canonical",
84
+ "33101": "canonical",
85
+ "34443": "canonical",
86
+ "42161": "canonical",
87
+ "42220": "canonical",
88
+ "43114": "canonical",
89
+ "54211": "canonical",
90
+ "59140": "canonical",
91
+ "59141": "canonical",
92
+ "59144": "canonical",
93
+ "80001": "canonical",
94
+ "80085": "canonical",
95
+ "81457": "canonical",
96
+ "84531": "canonical",
97
+ "84532": "canonical",
98
+ "90001": "canonical",
99
+ "105105": "canonical",
100
+ "111188": "canonical",
101
+ "167000": "canonical",
102
+ "167009": "canonical",
103
+ "205205": "canonical",
104
+ "444444": "canonical",
105
+ "534351": "canonical",
106
+ "534352": "canonical",
107
+ "555666": "canonical",
108
+ "713715": "canonical",
109
+ "6038361": "canonical",
110
+ "7225878": "canonical",
111
+ "7777777": "canonical",
112
+ "11155111": "canonical",
113
+ "11155420": "canonical",
114
+ "94204209": "canonical",
115
+ "111557560": "canonical",
116
+ "123420111": "canonical",
117
+ "168587773": "canonical",
118
+ "666666666": "canonical",
119
+ "999999999": "canonical",
120
+ "1313161554": "canonical",
121
+ "1313161555": "canonical",
122
+ "1666600000": "canonical",
123
+ "1666700000": "canonical",
124
+ "88153591557": "canonical"
114
125
  },
115
126
  "abi": [
116
127
  {
@@ -0,0 +1,12 @@
1
+ import { SingletonDeploymentJSON } from './types';
2
+ declare const _ACCESSOR_DEPLOYMENTS: SingletonDeploymentJSON[];
3
+ declare const _FACTORY_DEPLOYMENTS: SingletonDeploymentJSON[];
4
+ declare const _DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS: SingletonDeploymentJSON[];
5
+ declare const _COMPAT_FALLBACK_HANDLER_DEPLOYMENTS: SingletonDeploymentJSON[];
6
+ declare const _SAFE_DEPLOYMENTS: SingletonDeploymentJSON[];
7
+ declare const _SAFE_L2_DEPLOYMENTS: SingletonDeploymentJSON[];
8
+ declare const _MULTI_SEND_DEPLOYMENTS: SingletonDeploymentJSON[];
9
+ declare const _MULTI_SEND_CALL_ONLY_DEPLOYMENTS: SingletonDeploymentJSON[];
10
+ declare const _CREATE_CALL_DEPLOYMENTS: SingletonDeploymentJSON[];
11
+ declare const _SIGN_MESSAGE_LIB_DEPLOYMENTS: SingletonDeploymentJSON[];
12
+ export { _ACCESSOR_DEPLOYMENTS, _FACTORY_DEPLOYMENTS, _DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS, _COMPAT_FALLBACK_HANDLER_DEPLOYMENTS, _SAFE_DEPLOYMENTS, _SAFE_L2_DEPLOYMENTS, _MULTI_SEND_DEPLOYMENTS, _MULTI_SEND_CALL_ONLY_DEPLOYMENTS, _CREATE_CALL_DEPLOYMENTS, _SIGN_MESSAGE_LIB_DEPLOYMENTS, };
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports._SIGN_MESSAGE_LIB_DEPLOYMENTS = exports._CREATE_CALL_DEPLOYMENTS = exports._MULTI_SEND_CALL_ONLY_DEPLOYMENTS = exports._MULTI_SEND_DEPLOYMENTS = exports._SAFE_L2_DEPLOYMENTS = exports._SAFE_DEPLOYMENTS = exports._COMPAT_FALLBACK_HANDLER_DEPLOYMENTS = exports._DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS = exports._FACTORY_DEPLOYMENTS = exports._ACCESSOR_DEPLOYMENTS = void 0;
7
+ // This is a file where all the deployments are consolidated
8
+ // We do it in a separate file so we don't have to repeat comments about the array order and the type casting.
9
+ // We use some specific types (like `AddressType`) in the `SingletonDeploymentJSON` type, but the TypeScript cannot infer that from the JSON files.
10
+ // So we need to cast them to `SingletonDeploymentJSON` manually. The casting is valid because we have a test in `__tests__/assets.test.ts` that checks that the JSON files are valid.
11
+ // The arrays are sorted by preference, which at the moment means from the most recent version to the oldest.
12
+ // The arrays are prefixed with an underscore because they are not meant to be imported directly.
13
+ const simulate_tx_accessor_json_1 = __importDefault(require("./assets/v1.3.0/simulate_tx_accessor.json"));
14
+ const simulate_tx_accessor_json_2 = __importDefault(require("./assets/v1.4.1/simulate_tx_accessor.json"));
15
+ const _ACCESSOR_DEPLOYMENTS = [simulate_tx_accessor_json_2.default, simulate_tx_accessor_json_1.default];
16
+ exports._ACCESSOR_DEPLOYMENTS = _ACCESSOR_DEPLOYMENTS;
17
+ const proxy_factory_json_1 = __importDefault(require("./assets/v1.0.0/proxy_factory.json"));
18
+ const proxy_factory_json_2 = __importDefault(require("./assets/v1.1.1/proxy_factory.json"));
19
+ const proxy_factory_json_3 = __importDefault(require("./assets/v1.3.0/proxy_factory.json"));
20
+ const safe_proxy_factory_json_1 = __importDefault(require("./assets/v1.4.1/safe_proxy_factory.json"));
21
+ const _FACTORY_DEPLOYMENTS = [
22
+ safe_proxy_factory_json_1.default,
23
+ proxy_factory_json_3.default,
24
+ proxy_factory_json_2.default,
25
+ proxy_factory_json_1.default,
26
+ ];
27
+ exports._FACTORY_DEPLOYMENTS = _FACTORY_DEPLOYMENTS;
28
+ const default_callback_handler_json_1 = __importDefault(require("./assets/v1.1.1/default_callback_handler.json"));
29
+ const _DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS = [default_callback_handler_json_1.default];
30
+ exports._DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS = _DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS;
31
+ const compatibility_fallback_handler_json_1 = __importDefault(require("./assets/v1.3.0/compatibility_fallback_handler.json"));
32
+ const compatibility_fallback_handler_json_2 = __importDefault(require("./assets/v1.4.1/compatibility_fallback_handler.json"));
33
+ const _COMPAT_FALLBACK_HANDLER_DEPLOYMENTS = [
34
+ compatibility_fallback_handler_json_2.default,
35
+ compatibility_fallback_handler_json_1.default,
36
+ ];
37
+ exports._COMPAT_FALLBACK_HANDLER_DEPLOYMENTS = _COMPAT_FALLBACK_HANDLER_DEPLOYMENTS;
38
+ const safe_json_1 = __importDefault(require("./assets/v1.4.1/safe.json"));
39
+ const gnosis_safe_json_1 = __importDefault(require("./assets/v1.3.0/gnosis_safe.json"));
40
+ const gnosis_safe_json_2 = __importDefault(require("./assets/v1.2.0/gnosis_safe.json"));
41
+ const gnosis_safe_json_3 = __importDefault(require("./assets/v1.1.1/gnosis_safe.json"));
42
+ const gnosis_safe_json_4 = __importDefault(require("./assets/v1.0.0/gnosis_safe.json"));
43
+ const _SAFE_DEPLOYMENTS = [
44
+ safe_json_1.default,
45
+ gnosis_safe_json_1.default,
46
+ gnosis_safe_json_2.default,
47
+ gnosis_safe_json_3.default,
48
+ gnosis_safe_json_4.default,
49
+ ];
50
+ exports._SAFE_DEPLOYMENTS = _SAFE_DEPLOYMENTS;
51
+ const safe_l2_json_1 = __importDefault(require("./assets/v1.4.1/safe_l2.json"));
52
+ const gnosis_safe_l2_json_1 = __importDefault(require("./assets/v1.3.0/gnosis_safe_l2.json"));
53
+ const _SAFE_L2_DEPLOYMENTS = [safe_l2_json_1.default, gnosis_safe_l2_json_1.default];
54
+ exports._SAFE_L2_DEPLOYMENTS = _SAFE_L2_DEPLOYMENTS;
55
+ const multi_send_json_1 = __importDefault(require("./assets/v1.1.1/multi_send.json"));
56
+ const multi_send_json_2 = __importDefault(require("./assets/v1.3.0/multi_send.json"));
57
+ const multi_send_json_3 = __importDefault(require("./assets/v1.4.1/multi_send.json"));
58
+ const _MULTI_SEND_DEPLOYMENTS = [multi_send_json_3.default, multi_send_json_2.default, multi_send_json_1.default];
59
+ exports._MULTI_SEND_DEPLOYMENTS = _MULTI_SEND_DEPLOYMENTS;
60
+ const multi_send_call_only_json_1 = __importDefault(require("./assets/v1.3.0/multi_send_call_only.json"));
61
+ const multi_send_call_only_json_2 = __importDefault(require("./assets/v1.4.1/multi_send_call_only.json"));
62
+ const _MULTI_SEND_CALL_ONLY_DEPLOYMENTS = [multi_send_call_only_json_2.default, multi_send_call_only_json_1.default];
63
+ exports._MULTI_SEND_CALL_ONLY_DEPLOYMENTS = _MULTI_SEND_CALL_ONLY_DEPLOYMENTS;
64
+ const create_call_json_1 = __importDefault(require("./assets/v1.3.0/create_call.json"));
65
+ const create_call_json_2 = __importDefault(require("./assets/v1.4.1/create_call.json"));
66
+ const _CREATE_CALL_DEPLOYMENTS = [create_call_json_2.default, create_call_json_1.default];
67
+ exports._CREATE_CALL_DEPLOYMENTS = _CREATE_CALL_DEPLOYMENTS;
68
+ const sign_message_lib_json_1 = __importDefault(require("./assets/v1.3.0/sign_message_lib.json"));
69
+ const sign_message_lib_json_2 = __importDefault(require("./assets/v1.4.1/sign_message_lib.json"));
70
+ const _SIGN_MESSAGE_LIB_DEPLOYMENTS = [sign_message_lib_json_2.default, sign_message_lib_json_1.default];
71
+ exports._SIGN_MESSAGE_LIB_DEPLOYMENTS = _SIGN_MESSAGE_LIB_DEPLOYMENTS;
@@ -1,2 +1,13 @@
1
- import { DeploymentFilter, SingletonDeployment } from './types';
1
+ import { DeploymentFilter, SingletonDeployment, SingletonDeploymentV2 } from './types';
2
+ /**
3
+ * Finds the latest proxy factory deployment that matches the given filter.
4
+ * @param {DeploymentFilter} [filter] - The filter to apply when searching for the deployment.
5
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if no deployment matches the filter.
6
+ */
2
7
  export declare const getProxyFactoryDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
8
+ /**
9
+ * Finds all proxy factory deployments that match the given filter.
10
+ * @param {DeploymentFilter} [filter] - The filter to apply when searching for the deployments.
11
+ * @returns {SingletonDeploymentV2 | undefined} - The found deployments or undefined if no deployments match the filter.
12
+ */
13
+ export declare const getProxyFactoryDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;
package/dist/factories.js CHANGED
@@ -1,19 +1,23 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getProxyFactoryDeployment = void 0;
7
- const proxy_factory_json_1 = __importDefault(require("./assets/v1.0.0/proxy_factory.json"));
8
- const proxy_factory_json_2 = __importDefault(require("./assets/v1.1.1/proxy_factory.json"));
9
- const proxy_factory_json_3 = __importDefault(require("./assets/v1.3.0/proxy_factory.json"));
10
- const safe_proxy_factory_json_1 = __importDefault(require("./assets/v1.4.1/safe_proxy_factory.json"));
3
+ exports.getProxyFactoryDeployments = exports.getProxyFactoryDeployment = void 0;
11
4
  const utils_1 = require("./utils");
12
- // This is a sorted array (newest to oldest)
13
- const factoryDeployments = [
14
- safe_proxy_factory_json_1.default, proxy_factory_json_3.default, proxy_factory_json_2.default, proxy_factory_json_1.default
15
- ];
5
+ const deployments_1 = require("./deployments");
6
+ /**
7
+ * Finds the latest proxy factory deployment that matches the given filter.
8
+ * @param {DeploymentFilter} [filter] - The filter to apply when searching for the deployment.
9
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if no deployment matches the filter.
10
+ */
16
11
  const getProxyFactoryDeployment = (filter) => {
17
- return (0, utils_1.findDeployment)(filter, factoryDeployments);
12
+ return (0, utils_1.findDeployment)(filter, deployments_1._FACTORY_DEPLOYMENTS);
18
13
  };
19
14
  exports.getProxyFactoryDeployment = getProxyFactoryDeployment;
15
+ /**
16
+ * Finds all proxy factory deployments that match the given filter.
17
+ * @param {DeploymentFilter} [filter] - The filter to apply when searching for the deployments.
18
+ * @returns {SingletonDeploymentV2 | undefined} - The found deployments or undefined if no deployments match the filter.
19
+ */
20
+ const getProxyFactoryDeployments = (filter) => {
21
+ return (0, utils_1.findDeployment)(filter, deployments_1._FACTORY_DEPLOYMENTS, "multiple" /* DeploymentFormats.MULTIPLE */);
22
+ };
23
+ exports.getProxyFactoryDeployments = getProxyFactoryDeployments;
package/dist/handler.d.ts CHANGED
@@ -1,4 +1,32 @@
1
- import { DeploymentFilter, SingletonDeployment } from './types';
1
+ import { DeploymentFilter, SingletonDeployment, SingletonDeploymentV2 } from './types';
2
+ /**
3
+ * Get the default callback handler deployment based on the provided filter.
4
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
5
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
6
+ */
2
7
  export declare const getDefaultCallbackHandlerDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
8
+ /**
9
+ * Get all default callback handler deployments based on the provided filter.
10
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
11
+ * @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
12
+ */
13
+ export declare const getDefaultCallbackHandlerDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;
14
+ /**
15
+ * Get the compatibility fallback handler deployment based on the provided filter.
16
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
17
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
18
+ */
3
19
  export declare const getCompatibilityFallbackHandlerDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
20
+ /**
21
+ * Get all compatibility fallback handler deployments based on the provided filter.
22
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
23
+ * @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
24
+ */
25
+ export declare const getCompatibilityFallbackHandlerDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;
26
+ /**
27
+ * Get the fallback handler deployment based on the provided filter. This method is an alias for `getCompatibilityFallbackHandlerDeployment`.
28
+ * Kept for backwards compatibility.
29
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
30
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
31
+ */
4
32
  export declare const getFallbackHandlerDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
package/dist/handler.js CHANGED
@@ -1,34 +1,65 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFallbackHandlerDeployment = exports.getCompatibilityFallbackHandlerDeployment = exports.getDefaultCallbackHandlerDeployment = void 0;
7
- const default_callback_handler_json_1 = __importDefault(require("./assets/v1.1.1/default_callback_handler.json"));
8
- const compatibility_fallback_handler_json_1 = __importDefault(require("./assets/v1.3.0/compatibility_fallback_handler.json"));
9
- const compatibility_fallback_handler_json_2 = __importDefault(require("./assets/v1.4.1/compatibility_fallback_handler.json"));
3
+ exports.getFallbackHandlerDeployment = exports.getCompatibilityFallbackHandlerDeployments = exports.getCompatibilityFallbackHandlerDeployment = exports.getDefaultCallbackHandlerDeployments = exports.getDefaultCallbackHandlerDeployment = void 0;
10
4
  const utils_1 = require("./utils");
11
- // This is a sorted array (by preference)
12
- const defaultCallbackHandlerDeployments = [
13
- default_callback_handler_json_1.default
14
- ];
5
+ const deployments_1 = require("./deployments");
6
+ /**
7
+ * Get the default callback handler deployment based on the provided filter.
8
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
9
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
10
+ */
15
11
  const getDefaultCallbackHandlerDeployment = (filter) => {
16
- return (0, utils_1.findDeployment)(filter, defaultCallbackHandlerDeployments);
12
+ return (0, utils_1.findDeployment)(filter, deployments_1._DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS);
17
13
  };
18
14
  exports.getDefaultCallbackHandlerDeployment = getDefaultCallbackHandlerDeployment;
19
- // This is a sorted array (by preference)
20
- const compatFallbackHandlerDeployments = [
21
- compatibility_fallback_handler_json_2.default, compatibility_fallback_handler_json_1.default
22
- ];
15
+ /**
16
+ * Get all default callback handler deployments based on the provided filter.
17
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
18
+ * @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
19
+ */
20
+ const getDefaultCallbackHandlerDeployments = (filter) => {
21
+ return (0, utils_1.findDeployment)(filter, deployments_1._DEFAULT_CALLBACK_HANDLER_DEPLOYMENTS, "multiple" /* DeploymentFormats.MULTIPLE */);
22
+ };
23
+ exports.getDefaultCallbackHandlerDeployments = getDefaultCallbackHandlerDeployments;
24
+ /**
25
+ * Get the compatibility fallback handler deployment based on the provided filter.
26
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
27
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
28
+ */
23
29
  const getCompatibilityFallbackHandlerDeployment = (filter) => {
24
- return (0, utils_1.findDeployment)(filter, compatFallbackHandlerDeployments);
30
+ return (0, utils_1.findDeployment)(filter, deployments_1._COMPAT_FALLBACK_HANDLER_DEPLOYMENTS);
25
31
  };
26
32
  exports.getCompatibilityFallbackHandlerDeployment = getCompatibilityFallbackHandlerDeployment;
27
- // This is a sorted array (by preference)
28
- const fallbackHandlerDeployments = [
29
- compatibility_fallback_handler_json_2.default, compatibility_fallback_handler_json_1.default, default_callback_handler_json_1.default
30
- ];
31
- const getFallbackHandlerDeployment = (filter) => {
32
- return (0, utils_1.findDeployment)(filter, fallbackHandlerDeployments);
33
+ /**
34
+ * Get all compatibility fallback handler deployments based on the provided filter.
35
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
36
+ * @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
37
+ */
38
+ const getCompatibilityFallbackHandlerDeployments = (filter) => {
39
+ return (0, utils_1.findDeployment)(filter, deployments_1._COMPAT_FALLBACK_HANDLER_DEPLOYMENTS, "multiple" /* DeploymentFormats.MULTIPLE */);
33
40
  };
34
- exports.getFallbackHandlerDeployment = getFallbackHandlerDeployment;
41
+ exports.getCompatibilityFallbackHandlerDeployments = getCompatibilityFallbackHandlerDeployments;
42
+ /**
43
+ * Get the fallback handler deployment based on the provided filter. This method is an alias for `getCompatibilityFallbackHandlerDeployment`.
44
+ * Kept for backwards compatibility.
45
+ * @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
46
+ * @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
47
+ */
48
+ exports.getFallbackHandlerDeployment = exports.getCompatibilityFallbackHandlerDeployment;
49
+ // Leaving the comment here so it's not a part of the JSDoc
50
+ // Previously, the function code was this:
51
+ // // This is a sorted array (by preference)
52
+ // const fallbackHandlerDeployments: SingletonDeploymentJSON[] = [
53
+ // CompatibilityFallbackHandler141,
54
+ // CompatibilityFallbackHandler130,
55
+ // DefaultCallbackHandler130,
56
+ // ];
57
+ // export const getFallbackHandlerDeployment = (filter?: DeploymentFilter): SingletonDeployment | undefined => {
58
+ // return findDeployment(filter, fallbackHandlerDeployments);
59
+ // };
60
+ // The problem with the function is that there’s no possible filter that would make the function return the last element of the array
61
+ // (DefaultCallbackHandler130 ), since we only allow to filter by version, networks and released flag. The only possible way is to have
62
+ // the default callback handler deployed to a network where the compatibility fallback handler isn’t deployed, but we require the whole
63
+ // suite of the contracts be deployed to a network.
64
+ // Since we didn't want to enforce a preferred fallback handler on the deployments package level,
65
+ // we decided to alias it to getCompatibilityFallbackHandlerDeployment (previously returned value)
package/dist/libs.d.ts CHANGED
@@ -1,5 +1,49 @@
1
- import { DeploymentFilter, SingletonDeployment } from './types';
1
+ import { DeploymentFilter, SingletonDeployment, SingletonDeploymentV2 } from './types';
2
+ /**
3
+ * Get the MultiSend deployment based on the provided filter.
4
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployment.
5
+ * @returns {SingletonDeployment | undefined} - The matched deployment or undefined if not found.
6
+ */
2
7
  export declare const getMultiSendDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
8
+ /**
9
+ * Get all MultiSend deployments based on the provided filter.
10
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployments.
11
+ * @returns {SingletonDeploymentV2 | undefined} - The matched deployments or undefined if not found.
12
+ */
13
+ export declare const getMultiSendDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;
14
+ /**
15
+ * Get the MultiSendCallOnly deployment based on the provided filter.
16
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployment.
17
+ * @returns {SingletonDeployment | undefined} - The matched deployment or undefined if not found.
18
+ */
3
19
  export declare const getMultiSendCallOnlyDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
20
+ /**
21
+ * Get all MultiSendCallOnly deployments based on the provided filter.
22
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployments.
23
+ * @returns {SingletonDeploymentV2 | undefined} - The matched deployments or undefined if not found.
24
+ */
25
+ export declare const getMultiSendCallOnlyDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;
26
+ /**
27
+ * Get the CreateCall deployment based on the provided filter.
28
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployment.
29
+ * @returns {SingletonDeployment | undefined} - The matched deployment or undefined if not found.
30
+ */
4
31
  export declare const getCreateCallDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
32
+ /**
33
+ * Get all CreateCall deployments based on the provided filter.
34
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployments.
35
+ * @returns {SingletonDeploymentV2 | undefined} - The matched deployments or undefined if not found.
36
+ */
37
+ export declare const getCreateCallDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;
38
+ /**
39
+ * Get the SignMessageLib deployment based on the provided filter.
40
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployment.
41
+ * @returns {SingletonDeployment | undefined} - The matched deployment or undefined if not found.
42
+ */
5
43
  export declare const getSignMessageLibDeployment: (filter?: DeploymentFilter) => SingletonDeployment | undefined;
44
+ /**
45
+ * Get all SignMessageLib deployments based on the provided filter.
46
+ * @param {DeploymentFilter} [filter] - The filter criteria for the deployments.
47
+ * @returns {SingletonDeploymentV2 | undefined} - The matched deployments or undefined if not found.
48
+ */
49
+ export declare const getSignMessageLibDeployments: (filter?: DeploymentFilter) => SingletonDeploymentV2 | undefined;