@safe-global/safe-deployments 1.37.35 → 1.37.37
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.
- package/README.md +18 -10
- package/dist/assets/v1.3.0/compatibility_fallback_handler.json +21 -9
- package/dist/assets/v1.3.0/create_call.json +21 -9
- package/dist/assets/v1.3.0/gnosis_safe.json +21 -9
- package/dist/assets/v1.3.0/gnosis_safe_l2.json +22 -10
- package/dist/assets/v1.3.0/multi_send.json +21 -9
- package/dist/assets/v1.3.0/multi_send_call_only.json +21 -9
- package/dist/assets/v1.3.0/proxy_factory.json +21 -9
- package/dist/assets/v1.3.0/sign_message_lib.json +21 -9
- package/dist/assets/v1.3.0/simulate_tx_accessor.json +21 -9
- package/dist/assets/v1.4.1/compatibility_fallback_handler.json +14 -3
- package/dist/assets/v1.4.1/create_call.json +14 -3
- package/dist/assets/v1.4.1/multi_send.json +14 -3
- package/dist/assets/v1.4.1/multi_send_call_only.json +14 -3
- package/dist/assets/v1.4.1/safe.json +14 -3
- package/dist/assets/v1.4.1/safe_l2.json +14 -3
- package/dist/assets/v1.4.1/safe_migration.json +15 -3
- package/dist/assets/v1.4.1/safe_proxy_factory.json +14 -3
- package/dist/assets/v1.4.1/safe_to_l2_migration.json +15 -3
- package/dist/assets/v1.4.1/safe_to_l2_setup.json +15 -3
- package/dist/assets/v1.4.1/sign_message_lib.json +14 -3
- package/dist/assets/v1.4.1/simulate_tx_accessor.json +14 -3
- package/dist/assets/v1.5.0/compatibility_fallback_handler.json +380 -0
- package/dist/assets/v1.5.0/create_call.json +85 -0
- package/dist/assets/v1.5.0/extensible_fallback_handler.json +440 -0
- package/dist/assets/v1.5.0/multi_send.json +37 -0
- package/dist/assets/v1.5.0/multi_send_call_only.json +32 -0
- package/dist/assets/v1.5.0/safe.json +1016 -0
- package/dist/assets/v1.5.0/safe_l2.json +1121 -0
- package/dist/assets/v1.5.0/safe_migration.json +133 -0
- package/dist/assets/v1.5.0/safe_proxy_factory.json +248 -0
- package/dist/assets/v1.5.0/safe_to_l2_setup.json +50 -0
- package/dist/assets/v1.5.0/sign_message_lib.json +64 -0
- package/dist/assets/v1.5.0/simulate_tx_accessor.json +68 -0
- package/dist/assets/v1.5.0/token_callback_handler.json +188 -0
- package/dist/deployments.d.ts +3 -2
- package/dist/deployments.js +52 -19
- package/dist/handler.d.ts +26 -0
- package/dist/handler.js +40 -8
- package/package.json +1 -1
- package/src/__tests__/assets.test.ts +0 -16
- package/src/__tests__/factories.test.ts +10 -4
- package/src/__tests__/handler.test.ts +49 -9
- package/src/__tests__/libs.test.ts +43 -10
- package/src/__tests__/safes.test.ts +70 -10
- package/src/__tests__/utils.test.ts +141 -95
- package/src/assets/v1.3.0/compatibility_fallback_handler.json +21 -9
- package/src/assets/v1.3.0/create_call.json +21 -9
- package/src/assets/v1.3.0/gnosis_safe.json +21 -9
- package/src/assets/v1.3.0/gnosis_safe_l2.json +22 -10
- package/src/assets/v1.3.0/multi_send.json +21 -9
- package/src/assets/v1.3.0/multi_send_call_only.json +21 -9
- package/src/assets/v1.3.0/proxy_factory.json +21 -9
- package/src/assets/v1.3.0/sign_message_lib.json +21 -9
- package/src/assets/v1.3.0/simulate_tx_accessor.json +21 -9
- package/src/assets/v1.4.1/compatibility_fallback_handler.json +14 -3
- package/src/assets/v1.4.1/create_call.json +14 -3
- package/src/assets/v1.4.1/multi_send.json +14 -3
- package/src/assets/v1.4.1/multi_send_call_only.json +14 -3
- package/src/assets/v1.4.1/safe.json +14 -3
- package/src/assets/v1.4.1/safe_l2.json +14 -3
- package/src/assets/v1.4.1/safe_migration.json +15 -3
- package/src/assets/v1.4.1/safe_proxy_factory.json +14 -3
- package/src/assets/v1.4.1/safe_to_l2_migration.json +15 -3
- package/src/assets/v1.4.1/safe_to_l2_setup.json +15 -3
- package/src/assets/v1.4.1/sign_message_lib.json +14 -3
- package/src/assets/v1.4.1/simulate_tx_accessor.json +14 -3
- package/src/assets/v1.5.0/compatibility_fallback_handler.json +380 -0
- package/src/assets/v1.5.0/create_call.json +85 -0
- package/src/assets/v1.5.0/extensible_fallback_handler.json +440 -0
- package/src/assets/v1.5.0/multi_send.json +37 -0
- package/src/assets/v1.5.0/multi_send_call_only.json +32 -0
- package/src/assets/v1.5.0/safe.json +1016 -0
- package/src/assets/v1.5.0/safe_l2.json +1121 -0
- package/src/assets/v1.5.0/safe_migration.json +133 -0
- package/src/assets/v1.5.0/safe_proxy_factory.json +248 -0
- package/src/assets/v1.5.0/safe_to_l2_setup.json +50 -0
- package/src/assets/v1.5.0/sign_message_lib.json +64 -0
- package/src/assets/v1.5.0/simulate_tx_accessor.json +68 -0
- package/src/assets/v1.5.0/token_callback_handler.json +188 -0
- package/src/deployments.ts +50 -15
- package/src/handler.ts +46 -6
- package/src/__tests__/assets/v1/v1.0.0/gnosis_safe.json +0 -796
- package/src/__tests__/assets/v1/v1.0.0/proxy_factory.json +0 -111
- package/src/__tests__/assets/v1/v1.1.1/create_and_add_modules.json +0 -59
- package/src/__tests__/assets/v1/v1.1.1/create_call.json +0 -90
- package/src/__tests__/assets/v1/v1.1.1/default_callback_handler.json +0 -212
- package/src/__tests__/assets/v1/v1.1.1/gnosis_safe.json +0 -1001
- package/src/__tests__/assets/v1/v1.1.1/multi_send.json +0 -45
- package/src/__tests__/assets/v1/v1.1.1/proxy_factory.json +0 -191
- package/src/__tests__/assets/v1/v1.2.0/gnosis_safe.json +0 -1022
- package/src/__tests__/assets/v1/v1.3.0/compatibility_fallback_handler.json +0 -588
- package/src/__tests__/assets/v1/v1.3.0/create_call.json +0 -331
- package/src/__tests__/assets/v1/v1.3.0/gnosis_safe.json +0 -1296
- package/src/__tests__/assets/v1/v1.3.0/gnosis_safe_l2.json +0 -1401
- package/src/__tests__/assets/v1/v1.3.0/multi_send.json +0 -283
- package/src/__tests__/assets/v1/v1.3.0/multi_send_call_only.json +0 -278
- package/src/__tests__/assets/v1/v1.3.0/proxy_factory.json +0 -426
- package/src/__tests__/assets/v1/v1.3.0/sign_message_lib.json +0 -310
- package/src/__tests__/assets/v1/v1.3.0/simulate_tx_accessor.json +0 -314
- package/src/__tests__/assets/v1/v1.4.1/compatibility_fallback_handler.json +0 -447
- package/src/__tests__/assets/v1/v1.4.1/create_call.json +0 -192
- package/src/__tests__/assets/v1/v1.4.1/multi_send.json +0 -144
- package/src/__tests__/assets/v1/v1.4.1/multi_send_call_only.json +0 -139
- package/src/__tests__/assets/v1/v1.4.1/safe.json +0 -1123
- package/src/__tests__/assets/v1/v1.4.1/safe_l2.json +0 -1228
- package/src/__tests__/assets/v1/v1.4.1/safe_proxy_factory.json +0 -263
- package/src/__tests__/assets/v1/v1.4.1/sign_message_lib.json +0 -171
- package/src/__tests__/assets/v1/v1.4.1/simulate_tx_accessor.json +0 -175
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"released": true,
|
|
3
|
+
"contractName": "TokenCallbackHandler",
|
|
4
|
+
"version": "1.5.0",
|
|
5
|
+
"deployments": {
|
|
6
|
+
"canonical": {
|
|
7
|
+
"address": "0x54e86d004d71a8D2112ec75FaCE57D730b0433F3",
|
|
8
|
+
"codeHash": "0xcbc723172700efa52cc33ee26c7fc7e284edc8097f9dc307857fe525fec98cd8"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"networkAddresses": {
|
|
12
|
+
"1": "canonical",
|
|
13
|
+
"11155111": "canonical"
|
|
14
|
+
},
|
|
15
|
+
"abi": [
|
|
16
|
+
[
|
|
17
|
+
{
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"internalType": "address",
|
|
21
|
+
"name": "",
|
|
22
|
+
"type": "address"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"internalType": "address",
|
|
26
|
+
"name": "",
|
|
27
|
+
"type": "address"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"internalType": "uint256[]",
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "uint256[]"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"internalType": "uint256[]",
|
|
36
|
+
"name": "",
|
|
37
|
+
"type": "uint256[]"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"internalType": "bytes",
|
|
41
|
+
"name": "",
|
|
42
|
+
"type": "bytes"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"name": "onERC1155BatchReceived",
|
|
46
|
+
"outputs": [
|
|
47
|
+
{
|
|
48
|
+
"internalType": "bytes4",
|
|
49
|
+
"name": "",
|
|
50
|
+
"type": "bytes4"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"stateMutability": "view",
|
|
54
|
+
"type": "function"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"inputs": [
|
|
58
|
+
{
|
|
59
|
+
"internalType": "address",
|
|
60
|
+
"name": "",
|
|
61
|
+
"type": "address"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"internalType": "address",
|
|
65
|
+
"name": "",
|
|
66
|
+
"type": "address"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"internalType": "uint256",
|
|
70
|
+
"name": "",
|
|
71
|
+
"type": "uint256"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"internalType": "uint256",
|
|
75
|
+
"name": "",
|
|
76
|
+
"type": "uint256"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"internalType": "bytes",
|
|
80
|
+
"name": "",
|
|
81
|
+
"type": "bytes"
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"name": "onERC1155Received",
|
|
85
|
+
"outputs": [
|
|
86
|
+
{
|
|
87
|
+
"internalType": "bytes4",
|
|
88
|
+
"name": "",
|
|
89
|
+
"type": "bytes4"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"stateMutability": "view",
|
|
93
|
+
"type": "function"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"internalType": "address",
|
|
99
|
+
"name": "",
|
|
100
|
+
"type": "address"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"internalType": "address",
|
|
104
|
+
"name": "",
|
|
105
|
+
"type": "address"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"internalType": "uint256",
|
|
109
|
+
"name": "",
|
|
110
|
+
"type": "uint256"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"internalType": "bytes",
|
|
114
|
+
"name": "",
|
|
115
|
+
"type": "bytes"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"name": "onERC721Received",
|
|
119
|
+
"outputs": [
|
|
120
|
+
{
|
|
121
|
+
"internalType": "bytes4",
|
|
122
|
+
"name": "",
|
|
123
|
+
"type": "bytes4"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"stateMutability": "view",
|
|
127
|
+
"type": "function"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"inputs": [
|
|
131
|
+
{
|
|
132
|
+
"internalType": "bytes4",
|
|
133
|
+
"name": "interfaceId",
|
|
134
|
+
"type": "bytes4"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"name": "supportsInterface",
|
|
138
|
+
"outputs": [
|
|
139
|
+
{
|
|
140
|
+
"internalType": "bool",
|
|
141
|
+
"name": "",
|
|
142
|
+
"type": "bool"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"stateMutability": "view",
|
|
146
|
+
"type": "function"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"inputs": [
|
|
150
|
+
{
|
|
151
|
+
"internalType": "address",
|
|
152
|
+
"name": "",
|
|
153
|
+
"type": "address"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"internalType": "address",
|
|
157
|
+
"name": "",
|
|
158
|
+
"type": "address"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"internalType": "address",
|
|
162
|
+
"name": "",
|
|
163
|
+
"type": "address"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"internalType": "uint256",
|
|
167
|
+
"name": "",
|
|
168
|
+
"type": "uint256"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"internalType": "bytes",
|
|
172
|
+
"name": "",
|
|
173
|
+
"type": "bytes"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"internalType": "bytes",
|
|
177
|
+
"name": "",
|
|
178
|
+
"type": "bytes"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"name": "tokensReceived",
|
|
182
|
+
"outputs": [],
|
|
183
|
+
"stateMutability": "pure",
|
|
184
|
+
"type": "function"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
]
|
|
188
|
+
}
|
package/src/deployments.ts
CHANGED
|
@@ -9,15 +9,22 @@ import { SingletonDeploymentJSON } from './types';
|
|
|
9
9
|
|
|
10
10
|
import SimulateTxAccessor130 from './assets/v1.3.0/simulate_tx_accessor.json';
|
|
11
11
|
import SimulateTxAccessor141 from './assets/v1.4.1/simulate_tx_accessor.json';
|
|
12
|
+
import SimulateTxAccessor150 from './assets/v1.5.0/simulate_tx_accessor.json';
|
|
12
13
|
|
|
13
|
-
const _ACCESSOR_DEPLOYMENTS = [
|
|
14
|
+
const _ACCESSOR_DEPLOYMENTS = [
|
|
15
|
+
SimulateTxAccessor150,
|
|
16
|
+
SimulateTxAccessor141,
|
|
17
|
+
SimulateTxAccessor130,
|
|
18
|
+
] as SingletonDeploymentJSON[];
|
|
14
19
|
|
|
15
20
|
import ProxyFactory100 from './assets/v1.0.0/proxy_factory.json';
|
|
16
21
|
import ProxyFactory111 from './assets/v1.1.1/proxy_factory.json';
|
|
17
22
|
import ProxyFactory130 from './assets/v1.3.0/proxy_factory.json';
|
|
18
23
|
import SafeProxyFactory141 from './assets/v1.4.1/safe_proxy_factory.json';
|
|
24
|
+
import SafeProxyFactory150 from './assets/v1.5.0/safe_proxy_factory.json';
|
|
19
25
|
|
|
20
26
|
const _FACTORY_DEPLOYMENTS = [
|
|
27
|
+
SafeProxyFactory150,
|
|
21
28
|
SafeProxyFactory141,
|
|
22
29
|
ProxyFactory130,
|
|
23
30
|
ProxyFactory111,
|
|
@@ -25,24 +32,36 @@ const _FACTORY_DEPLOYMENTS = [
|
|
|
25
32
|
] as SingletonDeploymentJSON[];
|
|
26
33
|
|
|
27
34
|
import DefaultCallbackHandler130 from './assets/v1.1.1/default_callback_handler.json';
|
|
35
|
+
import TokenCallbackHandler150 from './assets/v1.5.0/token_callback_handler.json';
|
|
28
36
|
|
|
29
|
-
const
|
|
37
|
+
const _TOKEN_CALLBACK_HANDLER_DEPLOYMENTS = [
|
|
38
|
+
TokenCallbackHandler150,
|
|
39
|
+
DefaultCallbackHandler130,
|
|
40
|
+
] as SingletonDeploymentJSON[];
|
|
30
41
|
|
|
31
42
|
import CompatibilityFallbackHandler130 from './assets/v1.3.0/compatibility_fallback_handler.json';
|
|
32
43
|
import CompatibilityFallbackHandler141 from './assets/v1.4.1/compatibility_fallback_handler.json';
|
|
44
|
+
import CompatibilityFallbackHandler150 from './assets/v1.5.0/compatibility_fallback_handler.json';
|
|
33
45
|
|
|
34
46
|
const _COMPAT_FALLBACK_HANDLER_DEPLOYMENTS = [
|
|
47
|
+
CompatibilityFallbackHandler150,
|
|
35
48
|
CompatibilityFallbackHandler141,
|
|
36
49
|
CompatibilityFallbackHandler130,
|
|
37
50
|
] as SingletonDeploymentJSON[];
|
|
38
51
|
|
|
39
|
-
import
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
import ExtensibleFallbackHandler150 from './assets/v1.5.0/extensible_fallback_handler.json';
|
|
53
|
+
|
|
54
|
+
const _EXTENSIBLE_FALLBACK_HANDLER_DEPLOYMENTS = [ExtensibleFallbackHandler150] as SingletonDeploymentJSON[];
|
|
55
|
+
|
|
43
56
|
import GnosisSafe100 from './assets/v1.0.0/gnosis_safe.json';
|
|
57
|
+
import GnosisSafe111 from './assets/v1.1.1/gnosis_safe.json';
|
|
58
|
+
import GnosisSafe120 from './assets/v1.2.0/gnosis_safe.json';
|
|
59
|
+
import GnosisSafe130 from './assets/v1.3.0/gnosis_safe.json';
|
|
60
|
+
import Safe141 from './assets/v1.4.1/safe.json';
|
|
61
|
+
import Safe150 from './assets/v1.5.0/safe.json';
|
|
44
62
|
|
|
45
63
|
const _SAFE_DEPLOYMENTS = [
|
|
64
|
+
Safe150,
|
|
46
65
|
Safe141,
|
|
47
66
|
GnosisSafe130,
|
|
48
67
|
GnosisSafe120,
|
|
@@ -50,49 +69,65 @@ const _SAFE_DEPLOYMENTS = [
|
|
|
50
69
|
GnosisSafe100,
|
|
51
70
|
] as SingletonDeploymentJSON[];
|
|
52
71
|
|
|
53
|
-
import SafeL2141 from './assets/v1.4.1/safe_l2.json';
|
|
54
72
|
import GnosisSafeL2130 from './assets/v1.3.0/gnosis_safe_l2.json';
|
|
73
|
+
import SafeL2141 from './assets/v1.4.1/safe_l2.json';
|
|
74
|
+
import SafeL2150 from './assets/v1.5.0/safe_l2.json';
|
|
55
75
|
|
|
56
|
-
const _SAFE_L2_DEPLOYMENTS = [SafeL2141, GnosisSafeL2130] as SingletonDeploymentJSON[];
|
|
76
|
+
const _SAFE_L2_DEPLOYMENTS = [SafeL2150, SafeL2141, GnosisSafeL2130] as SingletonDeploymentJSON[];
|
|
57
77
|
|
|
58
78
|
import MultiSend111 from './assets/v1.1.1/multi_send.json';
|
|
59
79
|
import MultiSend130 from './assets/v1.3.0/multi_send.json';
|
|
60
80
|
import MultiSend141 from './assets/v1.4.1/multi_send.json';
|
|
81
|
+
import MultiSend150 from './assets/v1.5.0/multi_send.json';
|
|
61
82
|
|
|
62
|
-
const _MULTI_SEND_DEPLOYMENTS = [MultiSend141, MultiSend130, MultiSend111] as SingletonDeploymentJSON[];
|
|
83
|
+
const _MULTI_SEND_DEPLOYMENTS = [MultiSend150, MultiSend141, MultiSend130, MultiSend111] as SingletonDeploymentJSON[];
|
|
63
84
|
|
|
64
85
|
import MultiSendCallOnly130 from './assets/v1.3.0/multi_send_call_only.json';
|
|
65
86
|
import MultiSendCallOnly141 from './assets/v1.4.1/multi_send_call_only.json';
|
|
87
|
+
import MultiSendCallOnly150 from './assets/v1.5.0/multi_send_call_only.json';
|
|
66
88
|
|
|
67
|
-
const _MULTI_SEND_CALL_ONLY_DEPLOYMENTS = [
|
|
89
|
+
const _MULTI_SEND_CALL_ONLY_DEPLOYMENTS = [
|
|
90
|
+
MultiSendCallOnly150,
|
|
91
|
+
MultiSendCallOnly141,
|
|
92
|
+
MultiSendCallOnly130,
|
|
93
|
+
] as SingletonDeploymentJSON[];
|
|
68
94
|
|
|
69
95
|
import CreateCall130 from './assets/v1.3.0/create_call.json';
|
|
70
96
|
import CreateCall141 from './assets/v1.4.1/create_call.json';
|
|
97
|
+
import CreateCall150 from './assets/v1.5.0/create_call.json';
|
|
71
98
|
|
|
72
|
-
const _CREATE_CALL_DEPLOYMENTS = [CreateCall141, CreateCall130] as SingletonDeploymentJSON[];
|
|
99
|
+
const _CREATE_CALL_DEPLOYMENTS = [CreateCall150, CreateCall141, CreateCall130] as SingletonDeploymentJSON[];
|
|
73
100
|
|
|
74
101
|
import SignMessageLib130 from './assets/v1.3.0/sign_message_lib.json';
|
|
75
102
|
import SignMessageLib141 from './assets/v1.4.1/sign_message_lib.json';
|
|
103
|
+
import SignMessageLib150 from './assets/v1.5.0/sign_message_lib.json';
|
|
76
104
|
|
|
77
|
-
const _SIGN_MESSAGE_LIB_DEPLOYMENTS = [
|
|
105
|
+
const _SIGN_MESSAGE_LIB_DEPLOYMENTS = [
|
|
106
|
+
SignMessageLib150,
|
|
107
|
+
SignMessageLib141,
|
|
108
|
+
SignMessageLib130,
|
|
109
|
+
] as SingletonDeploymentJSON[];
|
|
78
110
|
|
|
79
111
|
import SafeMigration141 from './assets/v1.4.1/safe_migration.json';
|
|
112
|
+
import SafeMigration150 from './assets/v1.5.0/safe_migration.json';
|
|
80
113
|
|
|
81
|
-
const _SAFE_MIGRATION_DEPLOYMENTS = [SafeMigration141] as SingletonDeploymentJSON[];
|
|
114
|
+
const _SAFE_MIGRATION_DEPLOYMENTS = [SafeMigration150, SafeMigration141] as SingletonDeploymentJSON[];
|
|
82
115
|
|
|
83
116
|
import SafeToL2Migration141 from './assets/v1.4.1/safe_to_l2_migration.json';
|
|
84
117
|
|
|
85
118
|
const _SAFE_TO_L2_MIGRATION_DEPLOYMENTS = [SafeToL2Migration141] as SingletonDeploymentJSON[];
|
|
86
119
|
|
|
87
120
|
import SafeToL2Setup141 from './assets/v1.4.1/safe_to_l2_setup.json';
|
|
121
|
+
import SafeToL2Setup150 from './assets/v1.5.0/safe_to_l2_setup.json';
|
|
88
122
|
|
|
89
|
-
const _SAFE_TO_L2_SETUP_DEPLOYMENTS = [SafeToL2Setup141] as SingletonDeploymentJSON[];
|
|
123
|
+
const _SAFE_TO_L2_SETUP_DEPLOYMENTS = [SafeToL2Setup150, SafeToL2Setup141] as SingletonDeploymentJSON[];
|
|
90
124
|
|
|
91
125
|
export {
|
|
92
126
|
_ACCESSOR_DEPLOYMENTS,
|
|
93
127
|
_FACTORY_DEPLOYMENTS,
|
|
94
|
-
|
|
128
|
+
_TOKEN_CALLBACK_HANDLER_DEPLOYMENTS,
|
|
95
129
|
_COMPAT_FALLBACK_HANDLER_DEPLOYMENTS,
|
|
130
|
+
_EXTENSIBLE_FALLBACK_HANDLER_DEPLOYMENTS,
|
|
96
131
|
_SAFE_DEPLOYMENTS,
|
|
97
132
|
_SAFE_L2_DEPLOYMENTS,
|
|
98
133
|
_MULTI_SEND_DEPLOYMENTS,
|
package/src/handler.ts
CHANGED
|
@@ -1,25 +1,45 @@
|
|
|
1
1
|
import { DeploymentFilter, DeploymentFormats, SingletonDeployment, SingletonDeploymentV2 } from './types';
|
|
2
2
|
import { findDeployment } from './utils';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
_TOKEN_CALLBACK_HANDLER_DEPLOYMENTS,
|
|
5
|
+
_COMPAT_FALLBACK_HANDLER_DEPLOYMENTS,
|
|
6
|
+
_EXTENSIBLE_FALLBACK_HANDLER_DEPLOYMENTS,
|
|
7
|
+
} from './deployments';
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
|
-
* Get the
|
|
10
|
+
* Get the token callback handler deployment based on the provided filter.
|
|
7
11
|
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
8
12
|
* @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
|
|
9
13
|
*/
|
|
10
|
-
export const
|
|
11
|
-
return findDeployment(filter,
|
|
14
|
+
export const getTokenCallbackHandlerDeployment = (filter?: DeploymentFilter): SingletonDeployment | undefined => {
|
|
15
|
+
return findDeployment(filter, _TOKEN_CALLBACK_HANDLER_DEPLOYMENTS);
|
|
12
16
|
};
|
|
13
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Get the default callback handler deployment based on the provided filter.
|
|
20
|
+
* Note that this is an alias to `getTokenCallbackHandlerDeployment` for API backwards compatibility.
|
|
21
|
+
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
22
|
+
* @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
|
|
23
|
+
*/
|
|
24
|
+
export const getDefaultCallbackHandlerDeployment = getTokenCallbackHandlerDeployment;
|
|
25
|
+
|
|
14
26
|
/**
|
|
15
27
|
* Get all default callback handler deployments based on the provided filter.
|
|
16
28
|
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
17
29
|
* @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
|
|
18
30
|
*/
|
|
19
|
-
export const
|
|
20
|
-
return findDeployment(filter,
|
|
31
|
+
export const getTokenCallbackHandlerDeployments = (filter?: DeploymentFilter): SingletonDeploymentV2 | undefined => {
|
|
32
|
+
return findDeployment(filter, _TOKEN_CALLBACK_HANDLER_DEPLOYMENTS, DeploymentFormats.MULTIPLE);
|
|
21
33
|
};
|
|
22
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Get all default callback handler deployments based on the provided filter.
|
|
37
|
+
* Note that this is an alias to `getTokenCallbackHandlerDeployments` for API backwards compatibility.
|
|
38
|
+
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
39
|
+
* @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
|
|
40
|
+
*/
|
|
41
|
+
export const getDefaultCallbackHandlerDeployments = getTokenCallbackHandlerDeployments;
|
|
42
|
+
|
|
23
43
|
/**
|
|
24
44
|
* Get the compatibility fallback handler deployment based on the provided filter.
|
|
25
45
|
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
@@ -42,6 +62,26 @@ export const getCompatibilityFallbackHandlerDeployments = (
|
|
|
42
62
|
return findDeployment(filter, _COMPAT_FALLBACK_HANDLER_DEPLOYMENTS, DeploymentFormats.MULTIPLE);
|
|
43
63
|
};
|
|
44
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Get the extensible fallback handler deployment based on the provided filter.
|
|
67
|
+
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
68
|
+
* @returns {SingletonDeployment | undefined} - The found deployment or undefined if not found.
|
|
69
|
+
*/
|
|
70
|
+
export const getExtensibleFallbackHandlerDeployment = (filter?: DeploymentFilter): SingletonDeployment | undefined => {
|
|
71
|
+
return findDeployment(filter, _EXTENSIBLE_FALLBACK_HANDLER_DEPLOYMENTS);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Get all extensible fallback handler deployments based on the provided filter.
|
|
76
|
+
* @param {DeploymentFilter} [filter] - Optional filter to apply to the deployment search.
|
|
77
|
+
* @returns {SingletonDeploymentV2 | undefined} - The found deployments in version 2 format or undefined if not found.
|
|
78
|
+
*/
|
|
79
|
+
export const getExtensibleFallbackHandlerDeployments = (
|
|
80
|
+
filter?: DeploymentFilter,
|
|
81
|
+
): SingletonDeploymentV2 | undefined => {
|
|
82
|
+
return findDeployment(filter, _EXTENSIBLE_FALLBACK_HANDLER_DEPLOYMENTS, DeploymentFormats.MULTIPLE);
|
|
83
|
+
};
|
|
84
|
+
|
|
45
85
|
/**
|
|
46
86
|
* Get the fallback handler deployment based on the provided filter. This method is an alias for `getCompatibilityFallbackHandlerDeployment`.
|
|
47
87
|
* Kept for backwards compatibility.
|