I'm building a NFT Marketplace. I already set the mint function (with editions), list and buy function. Now i'm trying to build the auctions functions. On Smartpy, i created the Marketplace class, and now, i set the Auction class, but, if possible, how can i access the contract metadata from the marketplace class? I want to get someinfos from the Marketplace class, like, token_id, editions, owners, etc. On test, i already tried setting Marketplace class on a variable, and then, using it on Auction, but says:
Error: Contracts are not convertible into expressions.
SmartPy code line 247, in test (line 247)
auction = Auction(
SmartPy code line 154, in __init__ (line 154)
self.init(
module dc760 line 1373
setattr(self, k, v)
What i tried is something like this:
scenario.h1("MarketPlace")
marketplace = Marketplace(
token_contract.address,
sp.utils.metadata_of_url(
"ipfs://QmW8jPMdBmFvsSEoLWPPhaozN6jGQFxxkwuMLtVFqEy6Fb"
), admin.address)
scenario += marketplace
scenario.h1("Auction")
auction = Auction(
marketplace,
admin.address
)
scenario += auction