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

Adds CrossVMMetadataViews to templates package #477

Merged
merged 4 commits into from
Mar 7, 2025
Merged

Conversation

joshuahannan
Copy link
Member

@joshuahannan joshuahannan commented Feb 26, 2025

  • Updates the go dependencies
  • Adds the CrossVMMetadataViews placeholders, address, and replacement to the templates package so that it can be used properly in flow-go and other places for bootstrapping and testing. Also adds it to contracts package.
  • Adds ExampleNFT and LinearAddressGenerator to the contracts package.

@joshuahannan joshuahannan requested review from nvdtf and a team March 5, 2025 21:51
@joshuahannan
Copy link
Member Author

joshuahannan commented Mar 6, 2025

@sisyphusSmiling Can you give this a quick review? The changes are pretty minimal

Copy link
Contributor

@sisyphusSmiling sisyphusSmiling left a comment

Choose a reason for hiding this comment

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

Changes look consistent with existing patterns. LGTM

Comment on lines +371 to +377
func ExampleToken(env templates.Environment) []byte {
return ftcontracts.ExampleToken(env.FungibleTokenAddress, env.MetadataViewsAddress, env.FungibleTokenMetadataViewsAddress)
}

func ExampleNFT(env templates.Environment) []byte {
return nftcontracts.ExampleNFTWithCrossVMPointers(flow.HexToAddress(env.NonFungibleTokenAddress), flow.HexToAddress(env.MetadataViewsAddress), flow.HexToAddress(env.ViewResolverAddress), flow.HexToAddress(env.EVMAddress), flow.HexToAddress(env.CrossVMMetadataViewsAddress))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming these are just added for testing?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I added them so we could use them for testing in flow-go

@joshuahannan joshuahannan merged commit 4aa2772 into master Mar 7, 2025
2 checks passed
@joshuahannan joshuahannan deleted the crossVMviews branch March 7, 2025 15:06
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.

2 participants