@@ -21,23 +21,6 @@ Deposit funds for this account in Entrypoint.
21
21
22
22
23
23
24
- ### changeRole
25
-
26
- ``` solidity
27
- function changeRole(IAccountPermissions.RoleRequest _req, bytes _signature) external nonpayable
28
- ```
29
-
30
-
31
-
32
-
33
-
34
- #### Parameters
35
-
36
- | Name | Type | Description |
37
- | ---| ---| ---|
38
- | _ req | IAccountPermissions.RoleRequest | undefined |
39
- | _ signature | bytes | undefined |
40
-
41
24
### contractURI
42
25
43
26
``` solidity
@@ -125,28 +108,57 @@ EIP 4337 factory for this contract.
125
108
| ---| ---| ---|
126
109
| _ 0 | address | undefined |
127
110
128
- ### getAllRoleMembers
111
+ ### getAllActiveSigners
129
112
130
113
``` solidity
131
- function getAllRoleMembers(bytes32 _role ) external view returns (address[] )
114
+ function getAllActiveSigners( ) external view returns (struct IAccountPermissions.SignerPermissions[] signers )
132
115
```
133
116
134
- Returns all accounts that have a role .
117
+ Returns all signers with active permissions to use the account .
135
118
136
119
137
120
138
- #### Parameters
121
+
122
+ #### Returns
139
123
140
124
| Name | Type | Description |
141
125
| ---| ---| ---|
142
- | _ role | bytes32 | undefined |
126
+ | signers | IAccountPermissions.SignerPermissions[ ] | undefined |
127
+
128
+ ### getAllAdmins
129
+
130
+ ``` solidity
131
+ function getAllAdmins() external view returns (address[])
132
+ ```
133
+
134
+ Returns all admins of the account.
135
+
136
+
137
+
143
138
144
139
#### Returns
145
140
146
141
| Name | Type | Description |
147
142
| ---| ---| ---|
148
143
| _ 0 | address[ ] | undefined |
149
144
145
+ ### getAllSigners
146
+
147
+ ``` solidity
148
+ function getAllSigners() external view returns (struct IAccountPermissions.SignerPermissions[] signers)
149
+ ```
150
+
151
+ Returns all active and inactive signers of the account.
152
+
153
+
154
+
155
+
156
+ #### Returns
157
+
158
+ | Name | Type | Description |
159
+ | ---| ---| ---|
160
+ | signers | IAccountPermissions.SignerPermissions[ ] | undefined |
161
+
150
162
### getDeposit
151
163
152
164
``` solidity
@@ -181,66 +193,66 @@ Return the account nonce. This method returns the next sequential nonce. For a n
181
193
| ---| ---| ---|
182
194
| _ 0 | uint256 | undefined |
183
195
184
- ### getRoleRestrictions
196
+ ### getPermissionsForSigner
185
197
186
198
``` solidity
187
- function getRoleRestrictions(bytes32 _role ) external view returns (struct IAccountPermissions.RoleRestrictions )
199
+ function getPermissionsForSigner(address signer ) external view returns (struct IAccountPermissions.SignerPermissions )
188
200
```
189
201
190
- Returns the role restrictions for a given role .
202
+ Returns the restrictions under which a signer can use the smart wallet .
191
203
192
204
193
205
194
206
#### Parameters
195
207
196
208
| Name | Type | Description |
197
209
| ---| ---| ---|
198
- | _ role | bytes32 | undefined |
210
+ | signer | address | undefined |
199
211
200
212
#### Returns
201
213
202
214
| Name | Type | Description |
203
215
| ---| ---| ---|
204
- | _ 0 | IAccountPermissions.RoleRestrictions | undefined |
216
+ | _ 0 | IAccountPermissions.SignerPermissions | undefined |
205
217
206
- ### getRoleRestrictionsForAccount
218
+ ### initialize
207
219
208
220
``` solidity
209
- function getRoleRestrictionsForAccount (address _account ) external view returns (struct IAccountPermissions.RoleRestrictions)
221
+ function initialize (address _defaultAdmin, bytes ) external nonpayable
210
222
```
211
223
212
- Returns the role held by a given account along with its restrictions .
224
+ Initializes the smart contract wallet .
213
225
214
226
215
227
216
228
#### Parameters
217
229
218
230
| Name | Type | Description |
219
231
| ---| ---| ---|
220
- | _ account | address | undefined |
221
-
222
- #### Returns
223
-
224
- | Name | Type | Description |
225
- | ---| ---| ---|
226
- | _ 0 | IAccountPermissions.RoleRestrictions | undefined |
232
+ | _ defaultAdmin | address | undefined |
233
+ | _ 1 | bytes | undefined |
227
234
228
- ### initialize
235
+ ### isActiveSigner
229
236
230
237
``` solidity
231
- function initialize (address _defaultAdmin, bytes ) external nonpayable
238
+ function isActiveSigner (address signer ) external view returns (bool)
232
239
```
233
240
234
- Initializes the smart contract wallet .
241
+ Returns whether the given account is an active signer on the account .
235
242
236
243
237
244
238
245
#### Parameters
239
246
240
247
| Name | Type | Description |
241
248
| ---| ---| ---|
242
- | _ defaultAdmin | address | undefined |
243
- | _ 1 | bytes | undefined |
249
+ | signer | address | undefined |
250
+
251
+ #### Returns
252
+
253
+ | Name | Type | Description |
254
+ | ---| ---| ---|
255
+ | _ 0 | bool | undefined |
244
256
245
257
### isAdmin
246
258
@@ -442,10 +454,10 @@ Lets a contract admin set the URI for contract-level metadata.
442
454
| ---| ---| ---|
443
455
| _ uri | string | keccak256 hash of the role. e.g. keccak256(" ; TRANSFER_ROLE" ; ) |
444
456
445
- ### setRoleRestrictions
457
+ ### setPermissionsForSigner
446
458
447
459
``` solidity
448
- function setRoleRestrictions (IAccountPermissions.RoleRestrictions _restrictions ) external nonpayable
460
+ function setPermissionsForSigner (IAccountPermissions.SignerPermissionRequest _req, bytes _signature ) external nonpayable
449
461
```
450
462
451
463
@@ -456,7 +468,8 @@ function setRoleRestrictions(IAccountPermissions.RoleRestrictions _restrictions)
456
468
457
469
| Name | Type | Description |
458
470
| ---| ---| ---|
459
- | _ restrictions | IAccountPermissions.RoleRestrictions | undefined |
471
+ | _ req | IAccountPermissions.SignerPermissionRequest | undefined |
472
+ | _ signature | bytes | undefined |
460
473
461
474
### supportsInterface
462
475
@@ -504,10 +517,10 @@ function validateUserOp(UserOperation userOp, bytes32 userOpHash, uint256 missin
504
517
| ---| ---| ---|
505
518
| validationData | uint256 | undefined |
506
519
507
- ### verifyRoleRequest
520
+ ### verifySignerPermissionRequest
508
521
509
522
``` solidity
510
- function verifyRoleRequest (IAccountPermissions.RoleRequest req, bytes signature) external view returns (bool success, address signer)
523
+ function verifySignerPermissionRequest (IAccountPermissions.SignerPermissionRequest req, bytes signature) external view returns (bool success, address signer)
511
524
```
512
525
513
526
@@ -518,7 +531,7 @@ function verifyRoleRequest(IAccountPermissions.RoleRequest req, bytes signature)
518
531
519
532
| Name | Type | Description |
520
533
| ---| ---| ---|
521
- | req | IAccountPermissions.RoleRequest | undefined |
534
+ | req | IAccountPermissions.SignerPermissionRequest | undefined |
522
535
| signature | bytes | undefined |
523
536
524
537
#### Returns
@@ -552,7 +565,7 @@ Withdraw funds for this account from Entrypoint.
552
565
### AdminUpdated
553
566
554
567
``` solidity
555
- event AdminUpdated(address indexed account , bool isAdmin)
568
+ event AdminUpdated(address indexed signer , bool isAdmin)
556
569
```
557
570
558
571
Emitted when an admin is set or removed.
@@ -563,7 +576,7 @@ Emitted when an admin is set or removed.
563
576
564
577
| Name | Type | Description |
565
578
| ---| ---| ---|
566
- | account ` indexed ` | address | undefined |
579
+ | signer ` indexed ` | address | undefined |
567
580
| isAdmin | bool | undefined |
568
581
569
582
### ContractURIUpdated
@@ -599,41 +612,23 @@ event Initialized(uint8 version)
599
612
| ---| ---| ---|
600
613
| version | uint8 | undefined |
601
614
602
- ### RoleAssignment
603
-
604
- ``` solidity
605
- event RoleAssignment(bytes32 indexed role, address indexed account, address indexed signer, IAccountPermissions.RoleRequest request)
606
- ```
607
-
608
- Emitted when a role is granted / revoked by an authorized party.
609
-
610
-
611
-
612
- #### Parameters
613
-
614
- | Name | Type | Description |
615
- | ---| ---| ---|
616
- | role ` indexed ` | bytes32 | undefined |
617
- | account ` indexed ` | address | undefined |
618
- | signer ` indexed ` | address | undefined |
619
- | request | IAccountPermissions.RoleRequest | undefined |
620
-
621
- ### RoleUpdated
615
+ ### SignerPermissionsUpdated
622
616
623
617
``` solidity
624
- event RoleUpdated(bytes32 indexed role, IAccountPermissions.RoleRestrictions restrictions )
618
+ event SignerPermissionsUpdated(address indexed authorizingSigner, address indexed targetSigner, IAccountPermissions.SignerPermissionRequest permissions )
625
619
```
626
620
627
- Emitted when the restrictions for a given role are updated.
621
+ Emitted when permissions for a signer are updated.
628
622
629
623
630
624
631
625
#### Parameters
632
626
633
627
| Name | Type | Description |
634
628
| ---| ---| ---|
635
- | role ` indexed ` | bytes32 | undefined |
636
- | restrictions | IAccountPermissions.RoleRestrictions | undefined |
629
+ | authorizingSigner ` indexed ` | address | undefined |
630
+ | targetSigner ` indexed ` | address | undefined |
631
+ | permissions | IAccountPermissions.SignerPermissionRequest | undefined |
637
632
638
633
639
634
0 commit comments