Skip to content

chore(docs): Updates to token contract#9954

Merged
critesjosh merged 13 commits into
masterfrom
jc/docs-token-update
Nov 19, 2024
Merged

chore(docs): Updates to token contract#9954
critesjosh merged 13 commits into
masterfrom
jc/docs-token-update

Conversation

@critesjosh

Copy link
Copy Markdown
Contributor

Updates to the docs around recent token contract changes (#9606)

closes AztecProtocol/dev-rel#444

@critesjosh critesjosh marked this pull request as ready for review November 18, 2024 20:53
@critesjosh critesjosh requested review from a team, benesjan and rahul-kothari November 18, 2024 20:55
@github-actions

github-actions Bot commented Nov 18, 2024

Copy link
Copy Markdown
Contributor

Changes to public function bytecode sizes

Generated at commit: a28d8b561e56c1fcb8c1896d320ab6e3cca694af, compared to commit: 603b9c2a5dcc20dcffa81909b707a614a933888a

🧾 Summary (100% most significant diffs)

Program Bytecode size in bytes (+/-) %
AvmTest::sha256_hash -20 ✅ -0.51%
AvmTest::public_dispatch -380 ✅ -0.62%
CardGame::on_card_played -40 ✅ -0.67%
Uniswap::public_dispatch -180 ✅ -0.71%
AvmTest::keccak_hash -20 ✅ -0.72%
CardGame::on_game_joined -40 ✅ -0.79%
TokenBridge::public_dispatch -220 ✅ -0.98%
TokenBridge::exit_to_l1_public -80 ✅ -0.99%
TestLog::emit_unencrypted_events -20 ✅ -1.06%
Uniswap::swap_public -180 ✅ -1.13%
AvmTest::bulk_testing -280 ✅ -1.16%
TokenBridge::claim_public -180 ✅ -1.37%
Test::public_dispatch -300 ✅ -1.45%
AvmTest::pedersen_commit -20 ✅ -1.59%
Test::consume_mint_to_public_message -180 ✅ -1.60%
CardGame::on_cards_claimed -120 ✅ -1.61%
Test::consume_message_from_arbitrary_sender_public -160 ✅ -1.97%
CardGame::public_dispatch -400 ✅ -2.40%
CardGame::start_game -200 ✅ -2.79%
AvmTest::pedersen_hash -160 ✅ -5.17%
AvmTest::pedersen_hash_with_index -160 ✅ -5.17%
Test::create_l2_to_l1_message_public -160 ✅ -7.27%

Full diff report 👇
Program Bytecode size in bytes (+/-) %
AvmTest::sha256_hash 3,890 (-20) -0.51%
AvmTest::public_dispatch 61,361 (-380) -0.62%
CardGame::on_card_played 5,947 (-40) -0.67%
Uniswap::public_dispatch 25,076 (-180) -0.71%
AvmTest::keccak_hash 2,749 (-20) -0.72%
CardGame::on_game_joined 5,046 (-40) -0.79%
TokenBridge::public_dispatch 22,192 (-220) -0.98%
TokenBridge::exit_to_l1_public 7,996 (-80) -0.99%
TestLog::emit_unencrypted_events 1,865 (-20) -1.06%
Uniswap::swap_public 15,723 (-180) -1.13%
AvmTest::bulk_testing 23,795 (-280) -1.16%
TokenBridge::claim_public 12,956 (-180) -1.37%
Test::public_dispatch 20,364 (-300) -1.45%
AvmTest::pedersen_commit 1,235 (-20) -1.59%
Test::consume_mint_to_public_message 11,104 (-180) -1.60%
CardGame::on_cards_claimed 7,338 (-120) -1.61%
Test::consume_message_from_arbitrary_sender_public 7,977 (-160) -1.97%
CardGame::public_dispatch 16,243 (-400) -2.40%
CardGame::start_game 6,965 (-200) -2.79%
AvmTest::pedersen_hash 2,935 (-160) -5.17%
AvmTest::pedersen_hash_with_index 2,935 (-160) -5.17%
Test::create_l2_to_l1_message_public 2,042 (-160) -7.27%

@AztecBot

AztecBot commented Nov 18, 2024

Copy link
Copy Markdown
Collaborator

Docs Preview

Hey there! 👋 You can check your preview at https://673bf462e2d5308e30d80a21--aztec-docs-dev.netlify.app

@sklppy88 sklppy88 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving because this makes sense, but there is some weirdness in the common_patterns section, specifically where the TransparentNote stuff was.

Comment thread docs/docs/guides/developer_guides/getting_started.md Outdated
Comment thread docs/docs/tutorials/codealong/contract_tutorials/token_contract.md Outdated
critesjosh and others added 3 commits November 18, 2024 21:03
…t.md

Co-authored-by: esau <152162806+sklppy88@users.noreply.github.com>
@critesjosh critesjosh enabled auto-merge (squash) November 19, 2024 02:09
@critesjosh critesjosh merged commit 5c8c35d into master Nov 19, 2024
@critesjosh critesjosh deleted the jc/docs-token-update branch November 19, 2024 02:14
- `burn` enables tokens to be burned privately
- [`transfer`](#transfer) enables an account to send tokens from their private balance to another account's private balance
- [`transfer_in_private`](#transfer_in_private) enables an account to send tokens from another account's private balance to another account's private balance
- [`transfer_to_private`](#transfer_to_private) transfers a specified `amount` from an accounts public balance to a designated recipient. This flow starts in private, but will be completed in public.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we clarify "to a designated recipient's private balance" ?

- [`transfer`](#transfer) enables an account to send tokens from their private balance to another account's private balance
- [`transfer_in_private`](#transfer_in_private) enables an account to send tokens from another account's private balance to another account's private balance
- [`transfer_to_private`](#transfer_to_private) transfers a specified `amount` from an accounts public balance to a designated recipient. This flow starts in private, but will be completed in public.
- [`transfer_to_public`](#transfer_to_public) transfers tokens from a private balance, to a (potentially different account's) public balance

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checking the code, transfer_to_public to also for transferring from another account's private balance (using authwits)

TomAFrench added a commit that referenced this pull request Nov 19, 2024
* master: (67 commits)
  chore: Fix bad merge on AztecLMDBStore initializer
  feat: add persisted database of proving jobs (#9942)
  chore: Clean up data configuration (#9973)
  chore: remove public kernels (#10027)
  chore: misc cleanup, docs and renaming (#9968)
  feat: IPA Accumulator in Builder (#9846)
  chore(docs): Updates to token contract (#9954)
  test(avm): minor benchmarking (#9869)
  chore(ci): run `l1-contracts` CI in parallel with `build` step (#10024)
  chore: build acir test programs in parallel to e2e build step (#9988)
  chore: pull out `array_set` pass changes (#9993)
  feat(avm): ephemeral avm tree (#9798)
  fix: don't take down runners with faulty runner check (#10019)
  feat(docs): add transaction profiler docs (#9932)
  chore: hotfix runner wait (#10018)
  refactor: remove EnqueuedCallSimulator (#10015)
  refactor: stop calling public kernels (#9971)
  git subrepo push --branch=master noir-projects/aztec-nr
  git_subrepo.sh: Fix parent in .gitrepo file. [skip ci]
  chore: replace relative paths to noir-protocol-circuits
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update token docs

4 participants