Skip to content
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

feat(docs): add tabs for deploying contract with cli and aztec.js #1703

Merged
merged 4 commits into from
Aug 22, 2023

Conversation

rahul-kothari
Copy link
Contributor

Fix #1608

@rahul-kothari rahul-kothari requested a review from benesjan August 21, 2023 16:05
@Maddiaa0 Maddiaa0 changed the title add tabs for deploying contract with cli and aztec.js feat(docs): add tabs for deploying contract with cli and aztec.js Aug 21, 2023
Copy link
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just added a few suggestions. Will approve once you address them.

docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Show resolved Hide resolved
@rahul-kothari rahul-kothari requested a review from benesjan August 22, 2023 09:31
@rahul-kothari rahul-kothari enabled auto-merge (squash) August 22, 2023 09:32
Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some nits here

docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
</TabItem>
<TabItem value="js" label="Aztec.js">

Pre-requisite - Generate type-safe typescript classes for your contract when compiling:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to do this from aztec js as well? Ideally, want to support doing it fully programatically with aztec js and not having to touch the cli for some tests etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/docs/dev_docs/contracts/deploying.md Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
docs/docs/dev_docs/contracts/deploying.md Outdated Show resolved Hide resolved
<TabItem value="js" label="Aztec.js">

```ts
contract = await PrivateTokenContract.deploy(wallet, initialBalance, owner).send({ contractAddressSalt: Fr.fromString("0x123") }).deployed();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More api wise, but why are we not just calling it a salt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure 🤷

<TabItem value="js" label="Aztec.js">

```ts
contract = await PrivateTokenContract.deploy(wallet, initialBalance, owner).send({ contractAddressSalt: Fr.fromString("0x123") }).deployed();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
contract = await PrivateTokenContract.deploy(wallet, initialBalance, owner).send({ contractAddressSalt: Fr.fromString("0x123") }).deployed();
const contract = await PrivateTokenContract.deploy(wallet, initialBalance, owner).send({ contractAddressSalt: Fr.fromString("0x123") }).deployed();

Copy link
Contributor

@LHerskind LHerskind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rahul-kothari rahul-kothari merged commit d2a284d into master Aug 22, 2023
@rahul-kothari rahul-kothari deleted the rk/contract_docs branch August 22, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Document how to deploy contracts using aztec.js
4 participants