-
Notifications
You must be signed in to change notification settings - Fork 50
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
Conversation
4cce55b
to
3f68298
Compare
@sisyphusSmiling Can you give this a quick review? The changes are pretty minimal |
There was a problem hiding this 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
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)) | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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 tocontracts
package.ExampleNFT
andLinearAddressGenerator
to thecontracts
package.