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

chore: moved AddressNote to aztec.nr #2752

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions yarn-project/aztec-nr/address-note/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "address_note"
authors = ["aztec-labs"]
compiler_version = "0.7.1"
type = "lib"

[dependencies]
aztec = { path = "../aztec" }
1 change: 1 addition & 0 deletions yarn-project/aztec-nr/address-note/src/lib.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mod address_note;
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ type = "contract"

[dependencies]
aztec = { path = "../../../../aztec-nr/aztec" }
address_note = { path = "../../../../aztec-nr/address-note"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
mod address_note;

// Sample escrow contract that stores a balance of a private token on behalf of an owner.
contract Escrow {
use dep::std::option::Option;
Expand All @@ -17,7 +15,7 @@ contract Escrow {
state_vars::set::Set,
};

use crate::address_note::{
use dep::address_note::address_note::{
AddressNote,
AddressNoteMethods,
ADDRESS_NOTE_LEN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ type = "contract"

[dependencies]
aztec = { path = "../../../../aztec-nr/aztec" }
address_note = { path = "../../../../aztec-nr/address-note"}
value_note = { path = "../../../../aztec-nr/value-note"}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
mod address_note;

contract PokeableToken {
// Libs
use dep::std::option::Option;
Expand All @@ -19,7 +17,11 @@ contract PokeableToken {
state_vars::{immutable_singleton::ImmutableSingleton, map::Map, set::Set},
types::point::Point,
};
use crate::address_note::{AddressNote, AddressNoteMethods, ADDRESS_NOTE_LEN};
use dep::address_note::address_note::{
AddressNote,
AddressNoteMethods,
ADDRESS_NOTE_LEN,
};

struct Storage {
sender: ImmutableSingleton<AddressNote, ADDRESS_NOTE_LEN>,
Expand Down Expand Up @@ -50,8 +52,8 @@ contract PokeableToken {
sender: Field,
recipient: Field
) {
let mut sender_note = AddressNote::new(sender);
let mut recipient_note = AddressNote::new(recipient);
let mut sender_note = AddressNote::new(sender, sender);
let mut recipient_note = AddressNote::new(recipient, recipient);

storage.sender.initialize(&mut sender_note, Option::none());
storage.recipient.initialize(&mut recipient_note, Option::none());
Expand Down