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

Upgrade nargo to 0.29.0 #271

Merged
merged 1 commit into from
May 13, 2024
Merged

Upgrade nargo to 0.29.0 #271

merged 1 commit into from
May 13, 2024

Conversation

LogvinovLeon
Copy link
Collaborator

There is an issue in Noir 0.29.0 that it's impossible to call closures from comptime context: noir-lang/noir#4879
Therefore this PR changes the format of nft_list and now it has functions that return values that can use closures

global BORED_APE_YACHT_CLUB = ERC721Token {
address: [0xbc, 0x4c, 0xa0, 0xed, 0xa7, 0x64, 0x7a, 0x8a, 0xb7, 0xc2, 0x06, 0x1c, 0x2e, 0x11, 0x8a, 0x18, 0xa9, 0x36, 0xf1, 0x3d],
token_id_to_slot: |token_id| {
pub fn BORED_APE_YACHT_CLUB() -> ERC721Token {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why changed to function?

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, now I see

error: Returning closures from a comptime fn is currently unimplemented
  ┌─ /Users/akonior/projects/vlayer/noir-ethereum-history-api/vlayer/examples/circuits/is_ape_owner/src/main.nr:9:179let owner = BORED_APE_YACHT_CLUB.get_owner(token_id, block_number);

@Pasifaee Pasifaee merged commit 624c9aa into main May 13, 2024
6 checks passed
@Pasifaee Pasifaee deleted the leo/0.29.0 branch May 13, 2024 14:03
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.

None yet

4 participants