Skip to content

Commit a2df7c3

Browse files
Add SRC9 option to Cairo accounts (#422)
Co-authored-by: Eric Lau <[email protected]>
1 parent b829f16 commit a2df7c3

File tree

8 files changed

+337
-15
lines changed

8 files changed

+337
-15
lines changed

packages/core-cairo/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.20.1 (2024-12-17)
4+
5+
- Add OutsideExecution to accounts. ([#422](https://github.com/OpenZeppelin/contracts-wizard/pull/422))
6+
37
## 0.20.0 (2024-12-10)
48

59
- Add Governor tab. ([#417](https://github.com/OpenZeppelin/contracts-wizard/pull/417))
@@ -9,7 +13,7 @@
913

1014
## 0.19.0 (2024-11-27)
1115

12-
- Add ERC2981 (RoyaltyInfo) for ERC721 and ERC1155 ([#413](https://github.com/OpenZeppelin/contracts-wizard/pull/413))
16+
- Add ERC2981 (RoyaltyInfo) for ERC721 and ERC1155. ([#413](https://github.com/OpenZeppelin/contracts-wizard/pull/413))
1317

1418
## 0.18.0 (2024-11-15)
1519

packages/core-cairo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openzeppelin/wizard-cairo",
3-
"version": "0.20.0",
3+
"version": "0.20.1",
44
"description": "A boilerplate generator to get started with OpenZeppelin Contracts for Cairo",
55
"license": "MIT",
66
"repository": "github:OpenZeppelin/contracts-wizard",

packages/core-cairo/src/account.test.ts

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function testAPIEquivalence(title: string, opts?: AccountOptions) {
3838
declare: true,
3939
deploy: true,
4040
pubkey: true,
41+
outsideExecution: true,
4142
...opts,
4243
})));
4344
});
@@ -55,6 +56,7 @@ testAccount('explicit full account, mixin + upgradeable', {
5556
declare: true,
5657
deploy: true,
5758
pubkey: true,
59+
outsideExecution: true,
5860
upgradeable: true
5961
});
6062

@@ -64,47 +66,62 @@ testAccount('explicit full account, mixin + non-upgradeable', {
6466
declare: true,
6567
deploy: true,
6668
pubkey: true,
69+
outsideExecution: true,
6770
upgradeable: false
6871
});
6972

7073
testAccount('basic account, upgradeable', {
7174
declare: false,
7275
deploy: false,
73-
pubkey: false
76+
pubkey: false,
77+
outsideExecution: false,
7478
});
7579

7680
testAccount('basic account, non-upgradeable', {
7781
declare: false,
7882
deploy: false,
7983
pubkey: false,
84+
outsideExecution: false,
8085
upgradeable: false
8186
});
8287

88+
testAccount('account outside execution', {
89+
deploy: false,
90+
pubkey: false,
91+
declare: false,
92+
});
93+
8394
testAccount('account declarer', {
8495
deploy: false,
85-
pubkey: false
96+
pubkey: false,
97+
outsideExecution: false,
8698
});
8799

88100
testAccount('account deployable', {
89101
declare: false,
90-
pubkey: false
102+
pubkey: false,
103+
outsideExecution: false,
91104
});
92105

93106
testAccount('account public key', {
94107
declare: false,
95108
deploy: false,
109+
outsideExecution: false,
96110
});
97111

98112
testAccount('account declarer, deployable', {
99-
pubkey: false
113+
pubkey: false,
114+
outsideExecution: false,
100115
});
101116

102117
testAccount('account declarer, public key', {
103-
deploy: false
118+
deploy: false,
119+
outsideExecution: false,
104120
});
105121

106122
testAccount('account deployable, public key', {
107-
declare: false
123+
declare: false,
124+
outsideExecution: false,
108125
});
109126

110127
testEthAccount('default full ethAccount, mixin + upgradeable', {});
@@ -119,6 +136,7 @@ testEthAccount('explicit full ethAccount, mixin + upgradeable', {
119136
declare: true,
120137
deploy: true,
121138
pubkey: true,
139+
outsideExecution: true,
122140
upgradeable: true
123141
});
124142

@@ -128,47 +146,62 @@ testEthAccount('explicit full ethAccount, mixin + non-upgradeable', {
128146
declare: true,
129147
deploy: true,
130148
pubkey: true,
149+
outsideExecution: true,
131150
upgradeable: false
132151
});
133152

134153
testEthAccount('basic ethAccount, upgradeable', {
135154
declare: false,
136155
deploy: false,
137-
pubkey: false
156+
pubkey: false,
157+
outsideExecution: false,
138158
});
139159

140160
testEthAccount('basic ethAccount, non-upgradeable', {
141161
declare: false,
142162
deploy: false,
143163
pubkey: false,
164+
outsideExecution: false,
144165
upgradeable: false
145166
});
146167

168+
testEthAccount('ethAccount outside execution', {
169+
deploy: false,
170+
pubkey: false,
171+
declare: false,
172+
});
173+
147174
testEthAccount('ethAccount declarer', {
148175
deploy: false,
149-
pubkey: false
176+
pubkey: false,
177+
outsideExecution: false,
150178
});
151179

152180
testEthAccount('ethAccount deployable', {
153181
declare: false,
154-
pubkey: false
182+
pubkey: false,
183+
outsideExecution: false,
155184
});
156185

157186
testEthAccount('ethAccount public key', {
158187
declare: false,
159188
deploy: false,
189+
outsideExecution: false,
160190
});
161191

162192
testEthAccount('ethAccount declarer, deployable', {
163-
pubkey: false
193+
pubkey: false,
194+
outsideExecution: false,
164195
});
165196

166197
testEthAccount('ethAccount declarer, public key', {
167-
deploy: false
198+
deploy: false,
199+
outsideExecution: false,
168200
});
169201

170202
testEthAccount('ethAccount deployable, public key', {
171-
declare: false
203+
declare: false,
204+
outsideExecution: false,
172205
});
173206

174207
testAPIEquivalence('account API default');
@@ -179,6 +212,7 @@ testAPIEquivalence('account API basic', {
179212
declare: false,
180213
deploy: false,
181214
pubkey: false,
215+
outsideExecution: false,
182216
upgradeable: false,
183217
});
184218

@@ -188,6 +222,7 @@ testAPIEquivalence('account API full upgradeable', {
188222
declare: true,
189223
deploy: true,
190224
pubkey: true,
225+
outsideExecution: true,
191226
upgradeable: true,
192227
});
193228

0 commit comments

Comments
 (0)