Skip to content

Commit

Permalink
Update directory structure pending OpenZeppelin/cairo-contracts#350
Browse files Browse the repository at this point in the history
  • Loading branch information
ericglau committed Jun 17, 2022
1 parent 959e9eb commit 3b60db7
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion packages/core-cairo/src/add-pausable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function addPausable(c: ContractBuilder, access: Access, pausableFns: Bas

const modules = defineModules( {
Pausable: {
path: 'openzeppelin/security/pausable',
path: 'openzeppelin.security.library.Pausable',
usePrefix: true
},
});
Expand Down
44 changes: 22 additions & 22 deletions packages/core-cairo/src/erc20.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -160,7 +160,7 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.bool import TRUE␊
from starkware.starknet.common.syscalls import get_caller_address␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -314,9 +314,9 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -518,9 +518,9 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.bool import TRUE␊
from starkware.starknet.common.syscalls import get_caller_address␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -733,7 +733,7 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -878,7 +878,7 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -1021,8 +1021,8 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
from openzeppelin.access.library.Ownable import Ownable␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -1198,10 +1198,10 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.bool import TRUE␊
from starkware.starknet.common.syscalls import get_caller_address␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.upgrades.library import Proxy␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
from openzeppelin.upgrades.library.Proxy import Proxy␊
@external␊
func initializer{␊
Expand Down Expand Up @@ -1439,7 +1439,7 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -1582,7 +1582,7 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.uint256 import Uint256␊
from starkware.cairo.common.bool import TRUE␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -1726,10 +1726,10 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.bool import TRUE␊
from starkware.starknet.common.syscalls import get_caller_address␊
from openzeppelin.token.erc20.library import ERC20␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.upgrades.library import Proxy␊
from openzeppelin.token.erc20.library.ERC20 import ERC20␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
from openzeppelin.upgrades.library.Proxy import Proxy␊
@external␊
func initializer{␊
Expand Down
Binary file modified packages/core-cairo/src/erc20.test.ts.snap
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/core-cairo/src/erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function addMintable(c: ContractBuilder, access: Access) {

const modules = defineModules( {
ERC20: {
path: 'openzeppelin/token/erc20/library',
path: 'openzeppelin.token.erc20.library.ERC20',
usePrefix: true
},

Expand Down
50 changes: 25 additions & 25 deletions packages/core-cairo/src/erc721.test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -168,8 +168,8 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -332,10 +332,10 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -544,9 +544,9 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
from openzeppelin.access.library.Ownable import Ownable␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -731,11 +731,11 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.upgrades.library import Proxy␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
from openzeppelin.upgrades.library.Proxy import Proxy␊
@external␊
func initializer{␊
Expand Down Expand Up @@ -981,8 +981,8 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -1134,8 +1134,8 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
@constructor␊
func constructor{␊
Expand Down Expand Up @@ -1287,11 +1287,11 @@ Generated by [AVA](https://avajs.dev).
from starkware.cairo.common.cairo_builtins import HashBuiltin␊
from starkware.cairo.common.uint256 import Uint256␊
from openzeppelin.token.erc721.library import ERC721␊
from openzeppelin.introspection.ERC165 import ERC165␊
from openzeppelin.security.pausable import Pausable␊
from openzeppelin.access.ownable import Ownable␊
from openzeppelin.upgrades.library import Proxy␊
from openzeppelin.token.erc721.library.ERC721 import ERC721␊
from openzeppelin.introspection.library.ERC165 import ERC165␊
from openzeppelin.security.library.Pausable import Pausable␊
from openzeppelin.access.library.Ownable import Ownable␊
from openzeppelin.upgrades.library.Proxy import Proxy␊
@external␊
func initializer{␊
Expand Down
Binary file modified packages/core-cairo/src/erc721.test.ts.snap
Binary file not shown.
4 changes: 2 additions & 2 deletions packages/core-cairo/src/erc721.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ function addMintable(c: ContractBuilder, access: Access) {

const modules = defineModules( {
ERC165: {
path: 'openzeppelin.introspection.ERC165',
path: 'openzeppelin.introspection.library.ERC165',
usePrefix: true
},

ERC721: {
path: 'openzeppelin/token/erc721/library',
path: 'openzeppelin.token.erc721.library.ERC721',
usePrefix: true
},
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core-cairo/src/set-access-control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function setAccessControl(c: ContractBuilder, fn: BaseFunction, access: A

const modules = defineModules( {
Ownable: {
path: 'openzeppelin/access/ownable',
path: 'openzeppelin.access.library.Ownable',
usePrefix: true
},
})
Expand Down
2 changes: 1 addition & 1 deletion packages/core-cairo/src/set-upgradeable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function setUpgradeable(c: ContractBuilder, upgradeable: Upgradeable) {

const modules = defineModules( {
Proxy: {
path: 'openzeppelin/upgrades/library',
path: 'openzeppelin.upgrades.library.Proxy',
usePrefix: true
},
});
Expand Down

0 comments on commit 3b60db7

Please sign in to comment.