Skip to content

Commit

Permalink
Add SRC9 option to Cairo accounts (#422)
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Lau <[email protected]>
  • Loading branch information
ericnordelo and ericglau authored Dec 17, 2024
1 parent b829f16 commit a2df7c3
Show file tree
Hide file tree
Showing 8 changed files with 337 additions and 15 deletions.
6 changes: 5 additions & 1 deletion packages/core-cairo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.20.1 (2024-12-17)

- Add OutsideExecution to accounts. ([#422](https://github.com/OpenZeppelin/contracts-wizard/pull/422))

## 0.20.0 (2024-12-10)

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

## 0.19.0 (2024-11-27)

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

## 0.18.0 (2024-11-15)

Expand Down
2 changes: 1 addition & 1 deletion packages/core-cairo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openzeppelin/wizard-cairo",
"version": "0.20.0",
"version": "0.20.1",
"description": "A boilerplate generator to get started with OpenZeppelin Contracts for Cairo",
"license": "MIT",
"repository": "github:OpenZeppelin/contracts-wizard",
Expand Down
59 changes: 47 additions & 12 deletions packages/core-cairo/src/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function testAPIEquivalence(title: string, opts?: AccountOptions) {
declare: true,
deploy: true,
pubkey: true,
outsideExecution: true,
...opts,
})));
});
Expand All @@ -55,6 +56,7 @@ testAccount('explicit full account, mixin + upgradeable', {
declare: true,
deploy: true,
pubkey: true,
outsideExecution: true,
upgradeable: true
});

Expand All @@ -64,47 +66,62 @@ testAccount('explicit full account, mixin + non-upgradeable', {
declare: true,
deploy: true,
pubkey: true,
outsideExecution: true,
upgradeable: false
});

testAccount('basic account, upgradeable', {
declare: false,
deploy: false,
pubkey: false
pubkey: false,
outsideExecution: false,
});

testAccount('basic account, non-upgradeable', {
declare: false,
deploy: false,
pubkey: false,
outsideExecution: false,
upgradeable: false
});

testAccount('account outside execution', {
deploy: false,
pubkey: false,
declare: false,
});

testAccount('account declarer', {
deploy: false,
pubkey: false
pubkey: false,
outsideExecution: false,
});

testAccount('account deployable', {
declare: false,
pubkey: false
pubkey: false,
outsideExecution: false,
});

testAccount('account public key', {
declare: false,
deploy: false,
outsideExecution: false,
});

testAccount('account declarer, deployable', {
pubkey: false
pubkey: false,
outsideExecution: false,
});

testAccount('account declarer, public key', {
deploy: false
deploy: false,
outsideExecution: false,
});

testAccount('account deployable, public key', {
declare: false
declare: false,
outsideExecution: false,
});

testEthAccount('default full ethAccount, mixin + upgradeable', {});
Expand All @@ -119,6 +136,7 @@ testEthAccount('explicit full ethAccount, mixin + upgradeable', {
declare: true,
deploy: true,
pubkey: true,
outsideExecution: true,
upgradeable: true
});

Expand All @@ -128,47 +146,62 @@ testEthAccount('explicit full ethAccount, mixin + non-upgradeable', {
declare: true,
deploy: true,
pubkey: true,
outsideExecution: true,
upgradeable: false
});

testEthAccount('basic ethAccount, upgradeable', {
declare: false,
deploy: false,
pubkey: false
pubkey: false,
outsideExecution: false,
});

testEthAccount('basic ethAccount, non-upgradeable', {
declare: false,
deploy: false,
pubkey: false,
outsideExecution: false,
upgradeable: false
});

testEthAccount('ethAccount outside execution', {
deploy: false,
pubkey: false,
declare: false,
});

testEthAccount('ethAccount declarer', {
deploy: false,
pubkey: false
pubkey: false,
outsideExecution: false,
});

testEthAccount('ethAccount deployable', {
declare: false,
pubkey: false
pubkey: false,
outsideExecution: false,
});

testEthAccount('ethAccount public key', {
declare: false,
deploy: false,
outsideExecution: false,
});

testEthAccount('ethAccount declarer, deployable', {
pubkey: false
pubkey: false,
outsideExecution: false,
});

testEthAccount('ethAccount declarer, public key', {
deploy: false
deploy: false,
outsideExecution: false,
});

testEthAccount('ethAccount deployable, public key', {
declare: false
declare: false,
outsideExecution: false,
});

testAPIEquivalence('account API default');
Expand All @@ -179,6 +212,7 @@ testAPIEquivalence('account API basic', {
declare: false,
deploy: false,
pubkey: false,
outsideExecution: false,
upgradeable: false,
});

Expand All @@ -188,6 +222,7 @@ testAPIEquivalence('account API full upgradeable', {
declare: true,
deploy: true,
pubkey: true,
outsideExecution: true,
upgradeable: true,
});

Expand Down
Loading

0 comments on commit a2df7c3

Please sign in to comment.