-
Notifications
You must be signed in to change notification settings - Fork 185
Wizard API for Cairo #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Wizard API for Cairo #127
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8f7a686
Wizard API for Cairo
ericglau d8bd0cd
Allow no opts
ericglau 547cdb7
Add API tests
ericglau 3a877eb
Add API documentation
ericglau 473c652
Add changelog
ericglau 814e43d
Use api defaults for ERC721 ui
ericglau 2b10eca
Update packages/core-cairo/src/erc721.test.ts
ericglau 3ba335e
Create new object for Info to avoid nested reference
ericglau 19a8b34
Merge branch 'wizard-cairo-api' of github.com:ericglau/contracts-wiza…
ericglau 27489ec
Add note on Solidity API
ericglau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # API | ||
|
|
||
| The following describes how to use the Contracts Wizard programmatic API in your own applications. | ||
|
|
||
| ## Cairo | ||
|
|
||
| ### Installation | ||
|
|
||
| `npm install @openzeppelin/wizard-cairo` | ||
|
|
||
| ### Functions | ||
|
|
||
| #### `printERC20` | ||
| ```js | ||
| function printERC20(opts?: ERC20Options): string | ||
| ``` | ||
| Returns a string representation of an ERC20 contract generated using the provided options. If `opts` is not provided, uses [`erc20defaults`](#erc20defaults). | ||
|
|
||
| #### `printERC721` | ||
| ```js | ||
| function printERC721(opts?: ERC721Options): string | ||
| ``` | ||
| Returns a string representation of an ERC721 contract generated using the provided options. If `opts` is not provided, uses [`erc721defaults`](#erc721defaults). | ||
|
|
||
| ### Defaults | ||
|
|
||
| #### `erc20defaults` | ||
| ```js | ||
| const erc20defaults: Required<ERC20Options> | ||
| ``` | ||
| The default options that are used for [`printERC20`](#printerc20). | ||
|
|
||
| #### `erc721defaults` | ||
| ```js | ||
| const erc721defaults: Required<ERC721Options> | ||
| ``` | ||
| The default options that are used for [`printERC721`](#printerc721). | ||
|
|
||
| ## Solidity | ||
|
|
||
| Contracts Wizard API for Solidity is not available yet. Please reach out to us on [issue #129](https://github.com/OpenZeppelin/contracts-wizard/issues/129) if you would be interested in it. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Changelog | ||
|
|
||
| ## Unreleased | ||
|
|
||
| - Initial API for Cairo. ([#127](https://github.com/OpenZeppelin/contracts-wizard/pull/127)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.