Skip to content

Commit

Permalink
Fixes in contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Mar 4, 2024
1 parent 736f028 commit 5c67427
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ contract InclusionProofs {

#[aztec(public)]
#[aztec(initializer)]
fn constructor(public_value: Field) {
fn constructor(value: Field) {
storage.public_value.write(value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ contract TokenBlacklist {
#[aztec(initializer)]
fn constructor(admin: AztecAddress, slow_updates_contract: AztecAddress) {
// docs:end:constructor
assert(!new_admin.is_zero(), "invalid admin");
storage.admin.write(new_admin);
assert(!admin.is_zero(), "invalid admin");
storage.admin.write(admin);
// docs:start:write_slow_update_public
storage.slow_update.initialize(slow_updates_contract);
// docs:end:write_slow_update_public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ contract Token {
#[aztec(public)]
#[aztec(initializer)]
fn constructor(admin: AztecAddress, name: str<31>, symbol: str<31>, decimals: u8) {
assert(!new_admin.is_zero(), "invalid admin");
storage.admin.write(new_admin);
storage.minters.at(new_admin).write(true);
storage.name.initialize(name);
storage.symbol.initialize(symbol);
assert(!admin.is_zero(), "invalid admin");
storage.admin.write(admin);
storage.minters.at(admin).write(true);
storage.name.initialize(FieldCompressedString::from_string(name));
storage.symbol.initialize(FieldCompressedString::from_string(symbol));
// docs:start:initialize_decimals
storage.decimals.initialize(decimals);
// docs:end:initialize_decimals
Expand Down

0 comments on commit 5c67427

Please sign in to comment.