 So, I see we're at the top of the hour and you go if you want to do you want to give it one or two more minutes perhaps or I'm flexible whenever you want to get it started. Yeah, let's give it two more minutes. I just talked to one of my wingman here in the hallway and he's about to join as well so great. We'll give Alex and David a minute to join. Thank you everyone for joining us we started about two more minutes this will be live streamed and available on the hyper ledger YouTube channel live stream it right now will be available probably in an hour or so after the session ends. Great. And do you want to just get your live your screen shared again Nico just to make sure there's no issues. Yeah, I just double check that. Share some slides here. Okay, great. Yep. Okay, good. Thanks everyone for your patience I see people are dialing in maybe maybe just one more minute or so. So see where to after Nico I'm going to get the live stream going if you want to win another minute or so it's certainly fine but you know we get it. Yeah, let's roll. So the zoom is sometimes the live stream is sometimes a little bit particular here sorry. Okay you were live. Excellent. Thank you for the link for the guy that we'll be using. I'll send it out in just a minute actually we're ready to kick off. You're good to go. All right. Thank you everybody for attending today. I'm really excited about this workshop. Looks like we have a good turnout and looks like folks are still joining here. So let's go ahead and get things kicked off. I'm a software engineer here at collido and I'll be joined by Alex Schorcher and David as well. There are two other engineers here at collido and also maintainers on hyper ledger firefly. And so Alex and David will be helping out with the workshop today. There is a channel in discord that you can join if you haven't already for chat. This is going to be a very interactive very hands on workshop we're going to go through things slowly intentionally so that people can follow along and do things on their machine as we go. So just a couple of, you know, let me just share my whole screen here so I can share another window. Sorry about that. I'm just going to switch this real quick. Okay. So just a couple of things. This is the guide that we will be going through for today's workshop. I'm going to just drop this in the chat. So you have a link to it. You can have Docker installed on your computer we you will need that you'll need Docker and Docker composed. So go ahead and get that set up there's some some notes and prerequisites in the in the top of the guide here so you can start looking through that I do have a few slides that will go through kind of to kick this off but if you just want to glance at that real quick just to make sure that you'll be set up for when we get to the hands on part that you can go the other thing is the here's the channel that I mentioned so if you join the hyperledger discord server if you scroll down to the firefly channel there's a Firefly workshop channel here in the Firefly section. This is the channel that will use for dialogue during the workshop so if you have questions or if you get stuck on something or need help post it here and I'll try to monitor this but Alex and David will be monitoring it and answering questions in there as well. Okay, so where do my slides go here. Cool. Here we go. So just real quick want to go through the goals of this workshop so you know what we'll get out of it. We're going to learn how to set up Firefly and connect to a public chain. We are going to deploy and configure a custom token contract with Firefly. We're going to start that contract from scratch actually and I'm going to walk you through all the different parts of that. I'm going to upload NFT assets to public IPFS with Firefly and we're going to mint an NFT on a public chain and look at it on a public chain, and we'll be able to see it there. So, one other thing, I actually, I think I maybe mentioned forgot to mention this in in the guide. It's just now occurred to me, if you want to actually see your NFT in a real wallet app. I recommend the. I think I may have I may have mentioned this in the top of the guide here but I recommend the alpha wallet app. You can get it here. This is something you can set up on your smartphone. It's open source. So, you know, I like to recommend open source software. But this this app has a couple of features that we need for today. It allows you to connect to a test net, which we'll be using a test net for today so that you don't have to spend real money in order to mint your NFT. And it also shows the artwork of the NFT in there. So, when we get to the point where we actually minted our token and we want to transfer it to an address. You can use your. This is kind of an optional step but you can you can transfer it to your wallet address from this app and then you can actually see it to show up there. And so that's, that's kind of like a cool bonus feature. You want to go ahead and get that set up on your phone if you don't have a wallet app already that can connect to a test net. So that's just one of the things that we can set up. All right, for the agenda, we're going through the housekeeping stuff right now. I'm going to give you a very brief introduction to hyper ledger firefly. I'm going to try to keep it to five to 10 minutes. And just to kind of give, if folks are new to the project in general just kind of give an overview of like what, what is this thing. And, but I'm going to keep that brief because I really want to spend the bulk of the time, hands on the total workshop runtime is three hours. I can't sit still for three hours at a time so I've planned a couple of breaks in between certain sections so we'll see how far we get will kind of just will be flexible so if we, you know, this may not happen in exactly this order. But I want to give some people some breaks throughout because you may need to go get something to drink or or food depending on what time zone you're in. But we will plan on taking some breaks as we go. So here's just kind of a rough, a rough outline of the time and the order that we're going to do stuff in. If we have time at the end would love to just kind of have an open Q&A time as well. So that is the agenda. And with that, I'm just going to check chat here. Thanks for posting all the helpful links in there. Appreciate that. So let's get into just a very brief introduction to what is firefly. Firefly is a platform to build web three apps. So I like to describe this to developers. I like to use a stack diagram and I think this, this picture gets at the, the immediate value to a developer and I'm a developer and I assume probably many of you are as well or you're at least comfortable with code and that sort of thing so so hopefully this resonates with you as well. So we have three apps. Well, first you need to blockchain. You need, if you're going to have public data available, you probably need some sort of off chain storage, like an IPFS node. And there's lots of great open source projects for these types of things. So that's, that's great that we're not firefly is not trying to be another type of blockchain. It's not trying to be a DLT itself, but it builds on top of these really powerful technologies. The first thing you might need is you might need a token smart contract, you need something to manage your transactions that are going to that, that contract, you need to index events that are coming off of that contract so you need to write some code to do that. All these yellow boxes are stuff that you have to build if you haven't picked up on that so you probably also need to write some code to actually upload something. You're going to need stuff to manage your signing keys. You need a wallet, and you need to keep track of which tokens you own versus which tokens somebody else owns based on those events that are coming off of your contract. There's going to be some coordination between data that is on the chain, you know things like token indexes or other pieces of data that have been pinned to the chain, and also data that you need to keep off the chain as well data that's to either too large or too sensitive to be put on the blockchain itself. So you need some, some code to link those things and keep track of them and treat them as, you know, a transaction that encompasses both of those things. Likewise, along with that some some data needs to be public, some data needs to be private. And then, then finally you start to get up into the what we think of as the good stuff. The the actual business logic or your your back end API for your application, you know what, you know all of these things below this layer are just the things that you need to actually drive a blockchain. But then you know what what is your app actually do what what business value does it provide and that that's where we start to get into up in these top layers. And then finally you probably need some sort of front end for it you need something for your users to actually use like a web UI or a mobile app. So there's a lot of different pieces to build in in a web three app. So, you know you look at, okay there's there's some great open source projects here at the bottom. There will be great open source libraries and things that you can pull all together to make this all these yellow boxes that can help you with that but before Hyperledger Firefly there wasn't one platform that helps you with all of these things. So, that's what Hyperledger Firefly does it takes this whole middle section and says hey you know what, we have built a platform that handles all of this plumbing all of the the really hard and maybe not quite so interesting it's interesting from a technical perspective, maybe not from a business value perspective though. All of this stuff that you need to drive a web three application. Firefly is a common platform that provides this it's open source, it can be extended, it can connect to many different blockchains. It can connect to private permission chains, public chains. It's modular so it can be extended. And it's a common platform that solves all of these problems for you. So you can focus on now this really small top layer, which is your apps code. You can focus on the thing that actually drives your business real value like the business logic, the user experience and all this stuff and and you can use Fireflies API Fireflies WebSocket interfaces to work with technologies that develop the web to developers are already familiar with and can pick up and use right away and really leverage the power of web three quickly. So that's, that's I think the, you know, the real value of Firefly in a nutshell for developers that like it takes care of this huge portion of the tech stack that you don't have to recreate over and over and over for every web three app that you want to build. If you still want, you know, down, maybe, maybe you want more control down here at the contract layer and you want to use a custom contract like we're going to do today. Firefly absolutely lets you do that and that's that's one of the things we're going to show off today. You can use Fireflies built in token contracts if you want. You're not limited to that though you can you can plug in whatever smart contract you want. And it still gives you that if you need to go directly to the blockchain or use your custom, use a custom smart contract. It doesn't lock you out of doing those things. It's really meant to to complement all of those things and build on top of them. You know, where does Firefly fit into the picture for for an enterprise and that's that's really what you know hyperledger software is really geared toward enterprise. Firefly can can connect to public chain so it can be really useful for for, you know, personal projects as well. It's I think it's a great fit for that as well but it's primarily geared toward enterprise applications and it was designed that way from the from the get go. So, you know, Firefly you can think of as a web three gateway. Or in the cloud, or through a hosted provider, and it is the way that they can connect to everything web three, whether that's a consortium chain, whether that's a kind of a multi party network as we describe it of other organizations also running Firefly nodes, and they built a distributed network to collaborate using business transactions over a blockchain, or it could be your things that we tend to think of in the kind of the public crypto space, maybe maybe they're connecting to an exchange maybe they're connecting to a layer one chain and or different tokens or defy apps. Firefly can do all of the above and it is meant to be a one stop shop for here is a platform that your organization can install, and it can connect to the web three world, regardless of where it is or what technology what's inside of Firefly node, it is a microservice architecture, so it has a lot of different things inside it I've hinted at that a little bit that it's pluggable and that it's extensible. I won't go into the all the detail of every single thing on this diagram that's, there's are some already some great resources on YouTube that kind of break down this diagram and talk about all the different components and what it is but you know essentially at the top here you have, this is the application that you can build, and you can use Firefly as rest apis and you can receive events through Firefly's event delivery mechanism, which is today a web hooks and Web sockets, but again it's extensible Firefly provides an open api swagger interface which we will be looking at later today along with the Explorer UI will be looking at that as well, and those are all come hosted by Firefly core so Firefly core is kind of like the brain of the entire Firefly node, but it also connects to a bunch of other microservices to actually execute and carry out various types of transactions so those include a token connector, a blockchain connector, a distributed storage mechanism such as IPFS, a database and more so there's there's lots of different things that all make up a Firefly node. And again, there's again there's more material on YouTube and in the docs on what all those things are but I just wanted to give it just a brief peek under the hood so you can see that it's not just one thing that we're running there's a bunch of different services here. The Firefly command line interface which is what we'll be installing and running here shortly is a tool that is designed to run all of this in a local development environment setup on your machine. And it takes care of setting up and configuring all of these services for you so you can just run a couple commands and be up and running. So that's what we're going to run here and just a little bit to set everything up. Just a quick shout out to the Firefly community. We would love for plugged into the community. Please join the discord. Again, there's a dedicated channel for today's workshop in there, but you can also check out the source code for Firefly on GitHub. If you haven't, I'll just add a brief plug for it. If you like this workshop if you like the project. Please go to GitHub and click on this little button and star the project. We would love to get some more stars just to drive up visibility of the project in GitHub and in whatever other algorithms pay attention to that. So, just a quick little advertisement plug there. That is, that's it for slides. So I've tried to keep that brief I think I kept it to 15 minutes which was what about what I had allocated it for that so above me on Nico as usual. I try I try. Okay, so let's go ahead and hit this link now should be in the chat I'll just drop it in there one more time in case people have joined late. I don't think you can see old messages so there's again the guide that we're going to be going through. And we're done looking at slides so I'm just going to close that tab. Okay. Alex or David is there anything I should address. I'm just taking a quick peek at chat here any. Any questions that I should address before. Yeah, um, I think there was a question around what type of data is stored in the database in the zoom chat. Oh yeah, that's a good question. That's kind of just a general firefly question I'll take that one here real quick. Yeah, so firefly has its own database it keeps. It's basically so blockchains are not great at answering questions like what are all of the events that have been emitted from this particular smart contract with this particular signature such as if you wanted to know what all of the token transfers for a particular type of ERC 20 token. Well, you could figure that out from a blockchain node by starting back at when that contract was deployed and going through all the different blocks for that have been mined since then and looking for events that have been emitted from that contract that could take a long time depending on how how long ago that was so firefly keeps track of this is one example of the things that firefly keeps in its database. So you have to select to here index this this contract and store all of the events that you see in a right now it's some sort of sequel database, primarily Postgres is the main plugin that's most commonly used stores it in there in a fast access queryable way so it's it is. The short answer is most of the data that's in the firefly database is that has come from the blockchain, but we want to store in a way that can be queried really quickly and searched. Or it is data that is too sensitive to put on the blockchain. And so we keep it in a private database. And then we have a link or a pin to a hash of a transaction where that thing was was pinned to the blockchain so hopefully that's a, hopefully that was an answer to your question there. Great, thanks. There is no separate distribution for for. Okay, there is a there is a build for the firefly CLI for Mac OS. Yes, it should be in the downloads section there. Let's get to that here just a second once we jump into the guide. There is there is support for your 1155. There. The bit about the batch transfer. I'm not sure off the top of my head. Actually what you mean by that but maybe the answer to that question will become more clear as we as we get further into the workshop. Okay. Let's dive in. So, hopefully you've had a chance if you don't have Docker, hopefully you had a chance to set that up. We're going to start at the beginning now and I, I've actually gone and deleted my, my firefly CLI binary on my machine so I'm going to start it up. I'm going to install it from scratch just like you all are here as we go along. I'll make this a little bigger is sorry just quick check is is the font size acceptable through zoom to people or do I need to zoom in here. Just zoom in too many ways in one sentence. Be a step bigger. Better. More. Is that good. No, I'd have to take a screenshot and open it up. Okay, maybe you can go full screen with the screen share on your machine if you haven't. I go much bigger we're not going to be able to fit web interfaces on the screen here. Okay, I'll switch devices. Okay. Well, so just a couple of notes for for Linux users. It's it's recommended not to run the firefly CLI as root. I just I try not to run most things as root if I don't have to. So it's, it works better if you run everything as a standard user and add your user to the Docker group for Windows users. I recommend Windows subsystem for Linux too. There is not a windows specific binary for the firefly CLI, but if you set up WSL, you can run the Linux binary in your WSL environment and it should work fine. And it works well with Docker desktop for Windows as well. Okay, so in this workshop. Here's a picture I like pictures to kind of just explain what it is we're about to do. We're going to run the firefly CLI running on our local dev machine. It's going to be running a firefly core node. It's going to be running an EVM connect blockchain connector, and it will run a local IPFS node as well. That EVM connect is going to connect to a blockchain remote RPC node running in the cloud which I have provided a link to below in the in the command where we'll set all this up. The first RPC node is part of the polygon Mumbai test net. There are a bunch of other blockchain nodes that are all a part of this network. So down here I have my wallet app on my phone that I've set up I've installed alpha wallet on my phone. It has the ability also to connect to some RPC nodes. I have no idea where those ones are. It also has the ability to connect to IPFS nodes. The beauty of a completely distributed app is a decentralized app is that it doesn't matter where those nodes are running. They're participating in the same network. So this wallet app here can see things that our firefly node is putting on the chain putting an IPFS over here as well. So the idea is that we are going to deploy a contract to the public test net, and we're going to mentor token on it and end goal of being hopefully we should see that token show up in our wallet app. All right, so we're going to go through the getting started guide the first page of it to set up the firefly CLI. I'm going to go to the docs here. I'm actually open that in a new tab and I'm going to go to the latest release page on GitHub, and I'm just going to grab the latest firefly CLI binary. If I've go installed on your computer, it says my internet connection is unstable. Hopefully you all can hear me still. If you have go installed on your computer you can also go install. Okay, excellent. You can also go install the firefly CLI if you don't have go don't worry about it. You don't need to install it for this. So I'm just going to go here and grab the latest one. So there are binaries for Linux and for Mac OS as well. So make sure you grab the appropriate CPU architecture. There is a difference between arm 64 and x86 64. If you have an Intel CPU or AMD CPU, you probably want x86 64. I'm on an Apple Apple Silicon Mac. So I'm going to grab the arm 64 build here, and I'm going to download that one. Please make sure you grab the one that's the appropriate architecture, otherwise it will not work. And it doesn't give you a very helpful message as to why your operating system couldn't run the binary but it won't work. All right, that's going to download. There is a handy little command here. Really you can put this when you extract it, you can put the binary anywhere you want. The handy command, if you do run it with root or sudo, it will basically just extract the binary and it will move it to use your local bin for you. Assuming that it is in the downloads folder in your home directory. If that's not true, then this one liner won't work, but you're welcome to just extract the target and put it put the binary anywhere you want. I'm going to run that and. So now I should be able to which ff. Okay, so I have the firefire firefly CLI installed in user local bin now. That's great if I try to run it. Mac OS is going to say, Oh, I'm going to do that. Okay, I'll show you how to get around this real quick. We'll hit okay. Yes terminal bigger understood. Sorry about that. Okay, so Mac OS says. It's not signed. We didn't pay Apple boat loads of money. So it's not signed. So we need to go to system preferences and tell it that we want to run this anyway. So I go to security and privacy. And believe this is under general. So this is ff was blocked. I'm going to allow the next time I try to run it. It'll say are you really sure you want to run this and I say yes. Okay, there now it finally runs. So if you're on Mac OS couple hoops to jump through there but I don't believe Windows or Linux users will have that issue. But if you're on Mac, I'll just run you through there. Okay. I will. I'm going to pause running through steps. Hopefully you've been able to get this or you're in the process of getting through this I'm just going to describe what we're going to do next and and then we'll actually do it here in just a second. So I'm going to go back to the guide done on these tabs here, and I'm going to talk through these next couple of steps here before we actually run them. So, the, like I said that the Firefly CLI is a tool for creating a local development environment. So it has a bunch of different command line flags that we can get it. It has all of the when we ran just ff with no sub commands it listed out all the different sub commands that we can run. And this command is the, just make this even bigger here ff init is the command that will create a new stack for you to run that with dash dash help. The ff init command has a bunch of flags as well as well as two sub commands. We recommend using the the Ethereum or fabric specific sub commands they're newer and they have some some of the new command line flags are on these sub commands so if we run ff init Ethereum dash dash help. These are all the flags that we can customize for a an Ethereum stack running on our machine. I don't know what all of these are used for, but we also use the Firefly CLI to create test environments for Firefly as well so it's used in our CI pipeline. It's used for running the end to end tests against and and all the stuff so a lot of these things are for creating various permutations of all the different ways you can set up Firefly, specifically for automated testing, but it's also available for local development and debugging as well. Okay, so for for today what we're going to do is we're going to init an Ethereum stack. I'm going to name it workshop, and I only need one Firefly node, I'm not building a multi party network here so that's what these first few things do. I'm going to I'm going to set multi party mode off. I'm going to enable public IPFS so it's private by default. Today we're going to open it up to peer with public IPFS nodes though. Because we want our NFT assets to be visible on the public internet. And we're going to connect to a remote RPC nodes we're not going to run a blockchain node on our machine. So we're going to give it the URL of the blockchain node, and you may notice this URL has credentials in it. These are temporary credentials. This is a blockchain. It's an RPC gateway that is hosted by Kaleido, and these these colliders the company that I work for these credentials are temporary for this workshop only so they will be deactivated afterward but you all are welcome to use this one today during the workshop. I'm going to configure the chain ID for the Mumbai network. This is I've got to just look that up it's 2001 and we need to pass in a connector config so the connector config is just we're going to customize a couple of settings that are a little bit different from their default value because this is a public chain. So what we're going to do is we just need to create an evmconnect.yaml file. I probably have one already. Yep. Okay, so so I already have this file on my machine because I ran through this earlier but basically just create a file called evmconnect.yml. I just created it right in my home directory. And that it and then paste in these contents here. So what this is going to do is is going to tell it. I want to wait for four blocks to see to make sure that my transaction has been actually mined. I want to, and then just a couple of settings for you know how it computes gas prices and that sort of stuff. There's a question about the remote RPC node. It is not no it is not just a service returning an HTTP response it is actually the it actually is the blockchain node so it is. You do need to connect to a real blockchain node running somewhere in this case we're connecting to one in the cloud. You're more than welcome to run your own if you'd like or connect to a different one if you have one already. But this is the one that it I've tested and we're going to use for today so it's not something that you can just mock because it actually that actually is the blockchain you're connecting to. Yep, no problem. This is an infra based node we're connecting to it. This is a it is a RPC gateway that is hosted by Kaleido so it's it's not infura no it's this is a this is a piece of infrastructure that my company has stood up as well. Okay. So, I'm going to copy this command. I'm going to go over to my terminal and close out of them here. And I'm going to run this. That's going to initialize a new firefly stack. It's going to go great. Okay, we created it. And now you can type ff start workshop to start it up. I do that. And that will take a few minutes so that's basically going to start and configure all of those services that we were talking about earlier. I will, while this is going, I'll pause here to see if there are questions. I'm going to I'm going to check the discord chat as well. Can we host the application at Kaleido. Yes, you are more than welcome to host your own blockchain node if you want to it is, it's a lot of work, which is why we, we took that that's outside the scope of the workshop today is how to run your own public blockchain node. So it's a really fun project if you're interested in and learning about that but it's just outside the scope of today's workshop. So the question about if we have a Kaleido account can we use the Kaleido cloud. Great question. This is, this is a new feature that is not yet available if you log in to self service yet so not not at this time but maybe someday. David, Alex, any other questions that I should address here while we're waiting for this all to start up. Cool. So we'll just kind of take a. Okay, great. We're done here. Yeah, it's pulling a lot of stuff. Yes, there are a lot of Docker containers. I'll just give you a quick peek at what is currently running. So we're running Firefly core. We're running a token connector for your C 20 and your C 721. We're running for for your C 1155 as well. We're running Evm connect. We're running a data exchange service, a signing service and sandbox as well. So those are all the different things that that just stood up and yeah it's got pull images for for all those things. Hopefully you are getting close to to running this as well. I'm going to, I'm going to keep going through slow here. Any Docker image for FF for the, there's not a Docker image for the Firefly CLI itself, which is the FF command. This is the Docker image for Firefly core itself up here. But we don't, we don't provide a packaged image that has the command line in it. Well, I'm going to hop back over to the guide and talk about what we're going to do next. So before we can do anything with our with our Firefly node. Well actually here, let me show you. Yeah, I shouldn't have cleared that out but it printed to URLs there and if you don't clear your buffer like I just did, you should be able to go to localhosts 5000 slash UI, and I should be able to get the Firefly UI up here is the Firefly Explorer. You should also get the sandbox, which is on port 5109. And this is a really useful tool for playing around with Firefly as well. Yeah. Um, can you talk about the port 5000 and turning off the airplay? Oh, yes, yes, yes. Good. Thank you, David. Good call out. Okay, if you are. Yeah, so if you're if you're running on Mac OS in one of the recent versions, Apple very helpfully created a new service and turned it on for you by default, even though you didn't ask for them because Apple knows what you need. It is I go here and then go to sharing where sharing here it is. And at the bottom here there's an airplay receiver. Apparently, airplay also uses port 5000, which is the port that Firefly core by default wants to bind to doesn't have to you could change it. It's easier to uncheck this box and start everything up there. So if you're getting a message about something listening on port 5000 and you're on a Mac, you want to uncheck this box here. Okay, so, yeah, so there's the sandbox, there's the Explorer. So we've got everything up and running. And I'm going to go look back at the guide here and just kind of talk through the next couple of steps. To do anything. We, because this is a public chain, we, we need to fund our account so the on a public chain you have to, you have to pay a gas fee for the computational power that it takes to run your transaction. So we need to first look up what is the account address the wallet address that our Firefly node is using when the Firefly CLI created everything for you it generated a wallet for you that's on your local machine. And it has an address I'm just going to copy this bit here and paste this in my term. So if you run ff accounts list and then the name of the stack, it will list all the accounts that have been created and their private key. So I'm just just gripping by the address so I can just see the addresses. The private key is there if you need it can be useful but just be mindful about, I just didn't want to leak that on the screen so I'm just gripping by the address and so this is my public address that Firefly generated when it set up my stack. Yours will be different, it is randomly generated and so we will need this in just a little bit so I'm going to go ahead and copy that to my clipboard and we're going to go back to the guide here. So in order to fund this wallet, what we're going to do is we're going to go to polygon provides a faucet so a faucet is like for a test account. For a test network, a faucet is basically a page that you can go to and put in an address and get a very small amount of the blockchain's native currency to be able to run test transactions on there. So we're going to go open that in a new tab and hopefully the faucet is working. Okay, there we go. Yeah, so there's another question about port 5000. We just just talked about that a minute ago if you're on Mac OS, go to system preferences, sharing an unchecked Airplay receiver here. That's probably the most likely culprit. If it's not that then you'll need to do a little bit more to figure out what is listening on that process but if you're on a Mac that's probably the problem. Okay, so I'm just going to paste my my address here hit submit. This will give me one medic token, I confirm to say that the transfers on its way tokens will be transferred in one to two minutes so again it's going to wait for several blocks to be mined and wait for that confirmation. In the meantime, we can go to Mumbai polygon scan calm, and we can go look at our wallet here. I'm going to just paste that same address in. And so if I look at it right now, I don't see anything. I bet if I refresh this. I still don't see anything in just a second here should show up. Okay, there we go. So I thought it said it was going to give me one medic but it gave me point to that's fine that'll be more than enough. So I can see my address has point to medic in it. There still aren't any transactions that I have run on here. There's no ERC 20 token transactions but that's okay that's kind of what we expect we we've funded our account so we have the ability to do something now. So just going to do a quick time check here. Before we go into before we dive into actually creating the smart contract and deploying it. I think we'll, I think we may pause here for about 45 minutes in. I'll take a maybe take a little break in just a minute. I'll pause and ask if there are questions or if people are stuck. I want to give people time in order to make sure their stack is up and running and they've got Firefly up and make sure that they've got up to this point I don't want to leave people behind, if we can avoid it so. Great question here are the test net funds into the alpha wallet or the Firefly nodes address great question so I use here, I went to the command line, and I looked up the address my wallet address for the Firefly wallet. The, this is this is the signing key that Firefly will use when it submits transactions. If you installed alpha wallet on your app, it probably, I do, I believe you have the ability to import a private key there if you want to. I would suggest just having it generate a new wallet on your app and have use a separate address and we'll transfer it to that address later so we haven't haven't done anything with alpha wallet yet we'll come to that sort of at the end of the at the end of the guide. If you want to transfer it to that address later but that's that's a separate address. Great question. Check the discord chat to. Great. Just a note. There is we. You're welcome to use the zoom chat. We also have a discord channel open, which is much more rich chat. You can even post screenshots there if you're stuck on something. So the other advantages that chat will be preserved after this call ends. And so that's, I would recommend using the discord chat but you're, I'm not going to say you can't use the zoom chat either if that's just easier. Someone mentioned the faucets coming up as a blank page it did that for me as well and then I just gave it a second and I hit refresh and then it came up so hopefully all 100 of us hitting it aren't hitting it with too much traffic. Maybe just try refreshing it and see if it comes up. Great. Okay, there's a question in chat here. Someone use Docker compose down. That probably is. If you've done that, I would recommend running ff remove, and then the stack name. Kind of clear out everything here. I'll just type this in in the chat here. Besides firefly Docker, etc. is actually yes, we are actually running an IPFS node. So if we go look at what's running here. There is a go IPFS container that's running here as well. Just a quick note about IPFS so at some point in the workshop we will get to publishing an image and a metadata JSON file. I will say running an IPFS node locally, including running like just the IPFS desktop app that you can download from that the IPFS site. It's hit or miss whether files will actually successfully get replicated to public IPFS gateways where other apps can download them. And usually it comes down to networking problems. I'm in I'm sitting in an office right now so I'm behind in that and I don't have the ability to configure the firewall. Sometimes it's able to push files to gateways and it just works. Other times, the file just never ends up replicating so. That's in a production setting, you would want to run an IPFS node in probably the cloud or data center or not on a laptop behind a nap. You want to run it somewhere where you can configure the networking appropriately to expose the correct ports to IPFS so that it has nothing blocking its peering ability with other IPFS nodes. Yeah, IPFS is also running in in Docker here as well. Toledo has the ability to run IPFS nodes in the cloud. There is not currently a way in the Firefly CLI to automate the configuration of a remote IPFS node. That's something that the Firefly CLI could be enhanced to do but it doesn't, it just doesn't generate the appropriate config for that today. All right. Tell you what we are we're 10 minutes to the top of the hour here. Let's take a five minute break. I'm going to actually step away from my computer, go grab something to drink and we'll come back and I'll answer any more questions and hopefully, hopefully, folks, this will give folks a few more minutes if you're still stuck we're just trying trying to catch up, and we'll make sure that we get as many people caught up to this point as we can before we keep moving on in the workshop. So take a quick five minute break and I'll see you at five minutes till the top of the hour. Okay, I am back. I'm going to take a look at some questions that have come in here while I was away. An error on FF init is interesting. You could try adding the dash dash verbose flag to your init command like this. There was a question about can we use another account instead of the Firefly default account. Yes, so we're not going to for today for the workshop but in just technically speaking and what is possible absolutely. There are ways to Firefly is very flexible when it comes to key management and signing the implementation that we have running right now is a very simple straightforward file based wallet on the Firefly signer node that we looked at and it's one of the Docker containers that I'm currently running. But there are ways to create more keys, more wallets, and also use an external signer as well. Firefly supports a lot of different features in that regard. How can you check the data stored in IPFS using Firefly? Yeah, we'll get to the data APIs and Firefly in just a little bit. But you could, you know, if IPFS has its own REST API, you can query that REST API to look up data that's stored in it just like you could if it was running somewhere else as well. Just check Discord here. Okay, cool. Let's give it two more minutes. It's about lunchtime here in the US so I actually grabbed some food. I'm going to take a couple bites here. We'll kick off in the next phase of the workshop here in just a little bit, but I think I think we're running right on schedule here right now so this is great. So hopefully everyone is able to work through any issues they have getting things started up. If you're still stuck, let us know we're here to help. Yeah, let me drop the Discord link in here again. We'll get to the Hyperledger Discord and again we're in the, if you scroll down to the Firefly section, we're in the Firefly Workshop channel down here. This is the chat that we've got going here. Yep, no problem. I'm not quite sure I understand the question, where is the mintable. Yep, we'll be, we'll get to that in just a second. That's the next part of the workshop. I've been in chat about event streaming and Firefly's WebSocket event delivery mechanism. It's a great topic. A little bit outside the scope of today's workshop. I would love to, it's honestly probably worth the workshop just on its own, just all about events, but don't have time for that one today. Okay, we are going to move on. Hopefully everyone is got their Firefly stack running and their wallet funded and we're going to go create a smart contract now. So there are lots of different ways you can create a smart contract. I'm not here to be a smart contract development expert. I'm just here to give you a link to a thing that you can click and do in your browser really quickly for today's workshop so don't take this as the recommended way to do it necessarily, but I do think generally speaking, starting from something that has been already vetted by a wide open source community and used in production and like open Zeppelin contracts and libraries that you can build on there is a fantastic idea. Anywhere where I can leverage something that is open source that's already built already tested and rather than writing it again on my own, I'm going to do that so this is a great way to get started really quickly. I also think it happens to be a good way to if you really want to go deep on building your own custom token contract it's a good starting point at least so we're going to pop open the contracts wizard here. And we're going to today we're focusing on the NFTs. So we're going to use the ERC 721 contract. We're going to give it a name, and give it a symbol, and I probably need to zoom in for this tab as well. Sorry about that. For this one. Sorry, Alex just pointed out that I forgot to turn my screen share back on. There we go. Okay, so sorry about that. So, here we are in this tab in all I did was I went back to our guide scroll down here and clicked on this link, open up the contracts wizard in the new tab. And here we are. So, we're going to give it a name. I'm going to call mine, Firefly NFTs and a symbol will call it ff NFT or whatever you can call it whatever you want. We don't need to put in a base you're right here. You can if you like so this is where there's lots of different ways to do NFTs, lots of different ways even to do ERC 721. So what we are going to do today is we're going to set a unique URI for every token. Some contracts are set up such that there's a common base URI for all tokens, and each token has a unique index that is appended to that. That's another way of doing it. We're going to use a unique URI for everyone, and we'll set that in the contract later. So we have some features here we want to make this mintable. We're going to let the contract itself decide the IDs. So we don't have to tell it what token ID to mint we just when we call the mint function it will just meant the next one available. And, or like I said we're going to turn on the URI storage option, which allows us to customize the URI per token. I believe I'm going to double check my instructions in the guide, your C721 mintable auto increment IDs URI storage and a cool name. Okay, I think we've got all those. My cool name is debatable but I went with something that works. This is what we need so far so as you can see as you're checking on checking these boxes, it's actually writing some code for you which is great. If you haven't seen it before this is solidity. So solidity is a easy to use programming language that you can write in and debug and test in an IDE, and then it will get compiled down to Ethereum virtual machine or EVM bytecode. And that's what we actually deployed to the blockchain node. So the easiest way to do this and this is what the guide recommends is is to just do it all in your browser. You could, you could hit download and you could copy the source code file to like a hard hat project or truffle project and you could compile it locally and do all that. You're more than welcome to do that if you want to. For today I'm just going to hit open in remix. I'm going to try to do this all in my browser here. And we're going to use remix to compile it. And so it'll just open it up because this handles all the dependencies and everything like that so it's really just streamlined stuff. So I'm just going to come over here and hit compile. And I know this is probably pretty small on the screen. Okay, so great we've compiled it. We're going to come back to this page in just a minute, but I wanted to point out these two buttons right here, a bi and bytecode. And then we'll copy it to the clipboard so it basically takes the compiled output and puts it on your clipboard. That's what we're going to go give to firefly here in just a minute. All right, let's go back to the guide. So we are going to use firefly now to deploy our smart contract to the polygon test net. We can do this right in our browser through the swagger UI using the contracts deploy endpoint. So I'm going to click on that. It's going to open the swagger UI and automatically scroll me down to the contracts deploy endpoint. I'm going to hit try it out. There's sort of some instructions here in in the guide, which we can use we don't need necessarily all this is going to list all the different fields that are possible to send here. We don't need to set all those. So I'm just going to paste that in here. These are the really the only two that we need to set for today. If our contract had constructor arguments that are required we could list them out here, but this one doesn't. So I'm going to go back to remix says paste bytecode here paste a bi here. So that's what we're going to do. I'll copy the bytecode. Back to my swagger UI. And that's going to be just a big long hex string. So this is the compiled EVM bytecode that actually is the program that the blockchain will run. It's a definition. This is where we paste the API here. You may notice these these don't say bytecode and they don't say API. And the reason is Firefly works with more than just Ethereum. So we use we sort of took a step back when we're naming things and use more generic names. So we call it contract. This is the thing that actually is the smart contract. And because not all blockchains call the compiled thing bytecode. They may call it something different. Likewise, not every blockchain uses a thing called an API. They may call it something different or some blockchains may not even have that concept. So we call it contract definition. So I'm going to copy the API now, and I'm going to paste that here. It's important to note this is not this should not be wrapped in a string. This is a big JSON array that I copied. And so you want to set that when you hit copy it will give you the whole array. And if I scroll back up here to basically the definition should be an adjacent array. Okay, so that should be everything that we need. And I'm going to hit execute. And this will take a little bit of time. So you may notice that this is set to confirm true. And so, yep, I'll show that in just a second here. So this what confirm true means is will actually block the HTTP request, the response will block until the message the transaction is confirmed on the chain. And we told it that we want four blocks of confirmations. And so it's going to wait for four blocks to see that the contract that it deployed is in all of them to make sure that yep, this is this the the history of the chain has not changed. And, okay, great, cool. Someone asked what the difference between using Firefly CLI ff deploy is and the rest API. It's a great question so ff deploy came first, and it goes. It was before we added this endpoint to Firefly. So this endpoint is newer. It is the more recommended way to do it. Because the transaction itself will show up in Firefly and we'll go take a look at that in just a second. The ff deploy command goes straight to the blockchain connector and it sort of skips over the Firefly API. It still works. It still gets something on chain. I can't remember if it allows you it may be less flexible than this than this endpoint is so this this endpoint is designed so that you can use it in production ff deploy is really a development tool. Okay, I think I may have gone that through that a little bit too fast. What to do after compiling. Yes, so excuse me, I went I went to the guide and I clicked on this link. This will open up the swagger UI, which has a whole a list of a whole bunch of different endpoints. I think it automatically expanded this one. When you come to any of them though there's a button over here says try it out. And you need to click that and that's what makes this part editable. I'm going to be doing this for a bunch of different requests here so kind of just get used to that pattern in this interface this is this is a very common interface this is the swagger UI that many different services used. So a cool open source thing for interacting with API's. And then I just copied this payload right here, and I started with this and this is we just need to fill out by code and a bi here. So that's that's why I pasted here, and I got those by going to remix copying a bi code. So hopefully that helps hopefully folks are caught up with that. Okay, we did get a response here. Awesome, great. And there's a lot of stuff here. Most of it is the input. But if we scroll down. Sorry, that was sorry that was the input. We got to keep scrolling for the output here. If I scroll all the way down here at the bottom of the 200 response body. And then we see down here, there's a transaction hash, and there's a contract address. This is the important thing that we will look for. The other thing that I want to see is the block number that this was deployed in. So we don't get that back in the same response but we can go look in the Firefly Explorer now, and now this refresh button is popped up here so there's new data available. And to the question earlier of why, why would you use this API instead of ff deploy is because now we can do this now Firefly itself is aware that a smart contract was deployed. So I can go look at that contract deployment transaction. I can click on it, and then I can click this little button, which will pop out this thing here. And I can scroll all the way to the bottom here. Again, a lot of stuff. I should be able to see, here's my contract address. Here's the block number that it went into. We're going to use that in just a second. So this is a good place you can go look it up. We can also just go look this up on polygon scan now. So we go back and we refresh our page for our, I still have this polygon scan tab open. We refresh it, we'll see a transaction now from my Firefly node. And here was a contract creation. Oops, let's go into the transaction here and see like again all the same stuff that Firefly was just showing us we can see on the public blockchain explorer now as well. So the two key things here that we'll need for the next step are the contract address, which is right here and the block number which is right here. Now we can see that it's been confirmed at 122 blocks now. So we can either get this from polygon scan or from the Firefly Explorer itself. We'll need that for the next step. So actually, we'll come back to that in a couple steps here. Now what we're going to do is so we've deployed the contract to fire to through Firefly to the blockchain. We haven't told Firefly how we want to use this contract though. So that's the next step that we're going to do. What we're, the goal that we're working toward is we want to tell Firefly that this is a token contract and that this is an ERC 20 token contract. But we've also customized it. So we need to tell it about some of its custom ability. It looks like somebody in chat had an API call timeout. Maybe Alex or David can help look at that. Guessing that may have been either may not have funded your wallet or there was an issue with the blockchain transaction itself, but you might want to double check to see what actually happened on chain to see if it made it that far. Just check discord here. Okay, looks like. I'm just trying to keep an eye on questions and make sure I'm not going too far ahead of people here. But it looks like looks like we're doing well. So what we're going to do now is we're going to. So, like I was explaining earlier, Firefly has the concept of a. It's, it's multi chain and it's also not blockchain specific so we want to create an an FFI a Firefly interface, which is a generic way to describe a contract a smart contract. It's similar to the Ethereum API format, but it is more blockchain generic Firefly has the ability to go from an Ethereum API to a Firefly API and it's going to basically take the API and wrap it. In a Firefly generic format so we can do that with the contracts interface generate API here. So I'm going to click that. It's going to open my swagger UI here. And I'm going to hit try it out. And all we need to put here is we just needed an input API. So I'm going to paste that here. And then we're going to go back to remix. There was a question about where do I get the API invite code from I see in the chat so that's you get it from remix. And it's this button right here is where you get the API. This one right here gives the invite code. So we needed that in the previous step. I need the API again though for this step so I'm going to just going to click that copy up. I'm going to paste my API here and I'm going to hit execute. So this is just a convenience function. You can write a, you can write an FFI by hand if you want to, if you're using hyperledger fabric, there is not an API equivalent in fabric so you have the ability to create this API and define it for your contracts interface but fortunately for Ethereum which we're using today, there is a conversion available for that. Okay, so basically this is just a helper. So we're going to copy this whole payload that we get from here. I think this button should copy to my clipboard. See, copy that. And then we're going to go to the contracts interface endpoint, which is now we're actually going to load the interface the generated interface to Firefly. And again, we'll hit try it out. And then we'll paste this whole thing here. We do need to give it a name, and we need to give it a version those are the only other two mandatory fields. We call this, we'll call it Firefly tokens. I don't think you can put a space in the names and just be aware of that there's some some rules about I think letters numbers dashes and underscores are okay in the names but there are some restrictions on it to make this URL safe. In some cases, a version will just say v1.0.0 you can put in whatever you want in these two fields but they are required. I had execute and scroll down. Great. Okay, so we got a 200 from the server, and we got a, this is a contract interface ID so this is this is the important part that we'll we'll use in our next step. Hopefully I'm not going too fast through here. If you are, if you're struggling to keep up, all of these instructions are written in the guide so hopefully you can catch back up or follow along here. Description is optional. No, don't need that name and version are the two things that are required in addition to what was generated. There's a question about FFIs and tokens for hyperledger fabric. In theory, tokens on fabric would work fantastically. There today are not any token connectors in existence for Firefly on fabric though. So that would be a small piece of software that would need to be written. In terms of how you generate an FFI for fabric, it's, it's a lot of JSON writing. So we, there's, there's really no way to automatically generate them from a, from a fabric chain code today because fabric chain codes can be written in a variety of languages there's no one standard for how interfaces are defined on a fabric smart contract. Cool. All right. I'm just looking at the time we're doing well. I will pause here and just see if there's any other questions or just maybe give folks a minute if they need to get through creating the contract interface. Yeah, to copy the entire response I think on the swagger UI. Sorry, this is a request. When you look at the response body. I think this button copies at your clipboard. Just verify that here. Yes, it does. Okay. And keep moving on here. So where are we up to at this point, we have deployed the contract to the chain. We have told firefly about the, the interface of our particular contract. We haven't told firefly what to do with it yet. And we haven't told firefly about a specific instance of this interface that we want to start tracking. That's what we're going to do next. So, we have a few pieces of information. Now that we had from multiple previous steps so we're going to kind of combine all those so hopefully you remember where things came from feel free to scroll back up in the guide. If you can't remember where we saw certain things but the things we need are. The deployed contract address. And the block number so the two places we can look up those are on polygon scan, we can look up, you can either go to your account, and you can look up the the transactions and I can see here, I've got here's my contract address. Here's my block number. Or you can go to the firefly explorer, and to find it here. I think the probably the easiest way is to click on this contract deployment transaction. And then to go here and click this little pop out icon. And if we scroll to the bottom, all the way to the bottom. Here's our block number. Here's our contract address. Okay, so those are two important piece of information we need. Here's the token pools endpoint. Open. Okay, here we go. Sorry, I'm starting to get too many tabs open here. Hit try it out. I'm going to copy this payload here. And that's what I'm going to fill in here so that I can just replace all these things. Okay, so my deployed contract address. I'm going to get that from firefly explorer copy on here and watch out because it'll want to double quote it. Block number. I'm going to grab that from here, even though it is a number. Pass it in as a string and the interface ID. Okay, so this is this is the ID that we got from the previous step. And if we go back to the output of where we created the, sorry, I keep having to move the zoom chat around the screen there. We're looking at output here from our contracts interfaces request that we just made. We need to grab this interface ID. What we're going to do is this is going to link the token pool that we're creating to this particular contract interface. This tells firefly hey, this is an ERC 20 token, but it's got some extra stuff on it, because we checked all those little boxes in the contracts wizard to add features that are not necessarily in the base ERC 20 spec. I'm going to copy that with that right here interface ID, and then your token name and token symbol are what we put in here originally so I called mine firefly NFTs and ff NFT. I actually can't remember if a space is allowed there so I'm going to not put that there the symbol does need to match. So it's ff NFTs is what I called mine. And it's non fungible. That was pasted in there from that from the template. So, hopefully, hopefully I didn't go through that too fast. I'll review it here before I submit it but contract address and block number. We got from firefly explorer by. I just went back to my explorer dashboard is my contract deployment and click this pop out scroll all the way down. Here's my block number is my address. So that's where I got that from. Okay, then this interface ID is the you ID from the previous step that we just did, which was our where we posted the contract interface. And so I just copied that from here. And put it right in here. My name and my symbol is it needs to match what I put in my smart contract went back when we wrote it in the open Zeppelin wizard, and the name can be something different here. Invalid character curly brace looking for beginning of object. Make sure you are don't have like a stray comma or something in your, in your JSON be pasted that looks like a JSON deserialization issue. I'm going to hit execute. Oh, okay. Remember what I said about the, the name the symbol needing to match well I didn't make it match. Back here in my contract I put FF NFT singular. And here I put FF NFTs plural so you need to get rid of that s. All right, we got a 202. So that's the server has accepted our request, and it is it's activating that token pool, we should be able to go to the Firefly Explorer now. And now we should see some new stuff here. I can I can see my one failure because I had that failed request, because I had the typo in it. So there's my token pool token pool that failed. But I now have a token pool confirmed as well. So if I click on here, I can see that I can now also go over to on the left side. I can go to the tokens dashboard. And I can see my FF NFT pool here. Now there's no transactions on it. We haven't done anything with it. But it's here and Firefly is now tracking this token from the time that we created it on the blockchain in the original block number that it was deployed in. So that means any transaction, even if I had already minted some tokens in the past, say I'm pointing maybe this, maybe we want to use Firefly for a contract that's already been on a public chain somewhere. You put it in, put it pointed to the contract address and the block number that it was deployed in, it will go find all of the events that have already happened on it. So Firefly is going to store those events in its local database. That was a question that came up earlier was Firefly put in database. Well, this is a great example. It's going to put those events in its database so that you can query them and it can also populate this dashboard here. All right. That was a bunch of rest requests. We are through probably the most tedious and boring part of the workshop now. Let's do some fun stuff. Okay, now we're going to upload some token assets. So before we meant to token, we want some stuff to have our token point to one of the cool things about ERC 721 is that you can give it a URI have it point to something and have it represent something that is not on the blockchain. It becomes a sort of a tracking identifier for that thing. I'm going to use this little animated Firefly pixel art. You're welcome to use whatever image you want. Doesn't even have to be an image could be a document could be a video could be whatever you want. Please make sure you have the appropriate license and permission to use it. You have my permission to use my animated pixel art here. But yeah, so we're going to upload this image. We're also going to upload a metadata JSON as well, which will look like this. So we'll get to that step in just a minute. If you're not familiar with it with the ERC 721. It's the thing that our token will actually point out is not the image directly it points out a piece of JSON which then points at the image. So we're we'll start with the image though. All right, so I'm just going to go ahead and close some of these extra swagger tabs now because we don't need them open anymore. Just to kind of keep things streamlined here. Don't need this I don't need that either. Yeah. Okay. So we can use the swagger UI again to upload some data as well. There's some instructions in the guide on how to use this endpoint is a little bit different because we're going to be uploading a file so you want to change the default here is JSON. Because you can you can just post raw JSON payloads here as well. But we want to actually upload a file so change this to multi part form data. And then if we look at our instructions again it says uncheck the metadata and the validator fields as well. Trust me bro. That's that's the way to do it. Okay, then we need to choose our file. I've got my little Firefly GIF here, open, and I'm going to execute. Okay, so right now this just uploads the file to Firefly. And then it gives me an ID. Now, there's lots of different things you can do with data in Firefly. Perhaps I want to share this piece of data privately with another Firefly node run by a different organization will firefly lets you do that. Perhaps I want to pin this to the blockchain and send a message to many different Firefly nodes that are run by different organizations. Firefly lets me do that too. In my case, I want to actually push this piece of data up to IPFS and share it with the world. Firefly also lets me do that so it doesn't make an assumption about just because you give it a piece of data automatically what you want to do with it. So, handing the data to Firefly and then telling it what you want it to do with the data are two separate steps. So the next step we're going to do is to upload it to IPFS. So you can actually just, so I'm going to copy this ID. You can, you can do it in the same tab if you want you can just scroll down here to data data ID blob publish publishing it will send the data payload from Firefly itself to the IPFS node. So if we get it out. We don't, we don't need that so we'll just put an empty body there and then we need to paste the data ID here. Okay, and execute. Great. Okay, so we got a 200 response body, and we got an IPFS CID. This is really important. This is basically the IPFS hash for the data payload that we uploaded. So the, the guide talks about that. It's in, in the public field at the bottom of that request. So just to recap what we did there. We uploaded a gif to Firefly, and then we told Firefly hey, take this, this ID and push it to IPFS, and it did that, and it gave us the hash for that data. Once it landed on IPFS. We'll go ahead and pause here. See if there's any questions, or just give folks a minute to make sure that we're up to this point in the workshop here. Alright, so a couple questions in the chat. Is it possible to use ERC 4907 an extension of 721 instead of ERC 721. So, off the top of my head I'm not familiar with 4907, but technically speaking, yes. As long as a token standard, which I think all of them do have the ability to mint, transfer, and, and to be able to mint. So the functionality that Firefly uses for tokens is mint transfer approvals and burning a token. As long as there are ways to do that in your token standard, which as far as I know, pretty much all of them have support that minimum capability. You could create a token connector that that works with a different standard or an extension on that standard. If it's an extension of 721 it may just work with the existing token connector that's here already. Let's see there's a question about uploading. Well, if I have multilateral legal documents, sorry, I'm not sure exactly what you mean by a multilateral document. But if you had many different files and you wanted to treat them separately they yeah you would call the upload API separately for each one of them. If, if there's more to that question that I'm missing, please, please elaborate I'm happy to try to answer it. Yeah, those smart contracts yeah that's that's a whole topic in itself. Firefly does support upgradable contracts. I think. So actually the, the maintainer who is who's the resident expert on upgradable contracts is actually on vacation right now. But be a great question for him, I'm actually not sure off the top my head I think everything just works the same. Yeah, Andrew Richardson is the the one to ask about that one because I know he he's actually done some work on that in Firefly specifically. Question about what fields I filled in for the binary blob attachment. Just the ideas required, which yes so what all I did there was. So this is the where we filled out here where I uploaded. I attached my file here. And then I got the ID right here. Then I scrolled right down here to data data ID blob publish. I pasted that data ID in right here. You don't need any other fields in this request body can just be an empty, it needs to be an empty JSON object because Firefly expects it to be a JSON object, but it can be completely empty. Hopefully that helps. Let me just check discord. The question about how long the collider PC know will be valid. I'm planning on shutting it off later today, just because it's, I don't want to leave those credentials floating around the internet for too long. Okay, cool. Any other questions before we move on to the next step. So now we're going to create a metadata JSON. Now the reason we uploaded the image first is because the metadata JSON needs to actually reference that image. So we needed to get the IPFS hash for the image, because that needs to go into our JSON file. So, like I said earlier, are typically like if you go look up an NFT that's for sale and open C for instance, it will the uri for that token will point to a metadata JSON file. The, if you go look up the EIP 721. It says that it's an optional thing that an ERC 721 can have. Where is our private scroll broadcast it. Yep. Okay, so the metadata extension is optional for your C721. But if you do provide it, here's what it looks like. You can go read up on the actual standard if you want to. This is, this is an optional add on to it, but pretty much anybody that's doing NFTs in like a marketplace or something like that. It's it, that's what people do. Okay, so we're going to create this small piece of metadata JSON. And this is what our NFT is going to point out when we actually mint it onto the blockchain. What I'm going to do is I need to create a file with this in it. I think I actually already have one on my disk already so because I ran through this earlier when I set it up, but you could just, you can create a file with contents like this. Just a couple things to note. If you did not use the image that I used, you will have received a different hash right here, and you need to change that. So this needs to be whatever, whatever CID you got from the previous step here in this field right here. Okay. So you can give it whatever name you want, whatever description, you can give it a different external URL. Customize this however you want. This is your token that you're minting. You don't have to use the same thing that I did. This is just provided as an example. Okay, so I'm going to go through the same two steps that I did with the GIF and now I'm going to do that with the metadata as well. So here's my metadata. I hit open, set that one. Hit execute. I get a different ID back here. And again, I'm just going to scroll right down and now tell it to send that to IPFS. I'm going to execute and boom, there's my, that's my IPFS CID for the metadata. Now, in theory, if I've done this correctly, I go to, I think it's IPFS.io, it may not work. And this is I think this is due to my NAT configuration. I do, for some reason, the GIF works fine, but the metadata just hasn't, which is a bummer because I wanted to actually show it to you live, but oh, you know what, that's a, that was from a different workshop. I must have copied and pasted that CID from something else. Anyway, so you can, yeah, here's the real one. Sorry about that. That was from my last workshop where we did an NFT back at Hyperlegical Global Forum. I guess I, oh, I guess. This should be my GIF copy the right one here. Well, maybe, maybe not. This is again where I was talking about at the beginning of the workshop that in a production situation, you would definitely want your IPFS node to be more accessible to the public internet rather than running on a local dev machine. That is, that's okay. It may just take some time. It may get there eventually, but we can, we can keep moving on. We can actually mint the data or we can mint the token and still see the transaction on the public chain. That'll be, that'll still work great. All right, so now we are finally ready to mint our token. What we're going to do now is we're going to go to the tokens mint API. I'm just going to click that open it in a new tab, and that will scroll me down here. Try it out. I'm going to copy this payload. These are the only fields that we need. So amount is always one for an NFT. If this were an ERC 20 or a fungible token, we could put in any amount that we wanted here if we wanted to mint like 20 of them or a million of them all at once. And we can do that. NFTs are always because of the way the transaction and the actual smart contract is written. They are one token per transaction. And that's just the way the contract works. So what we're going to, we're going to mint one. We're going to put in our Firefly wallet address here. I can go get that again by running ff accounts list workshop. And get that right here. Let me just paste that in. And then I'm going to paste my IPFS CID here. I can go make sure I get the real one here. So this is from my metadata. I'm going to copy this. Paste it here. And I'll hit execute. Okay, and that minted a token. So now I see there's a few questions in chat. I will come I will address those in just a second. And now if I go back to my Firefly dashboard, I should see it refresh. Boom, there it is. It took it a second because it was still waiting for that confirmation to come in on the blockchain. But here it is. Here's my mint event. Here's my signing key that minted it. And it was to the same key. It was a mint. So it was from the zero address. And here's the IPFS URI that I put in when I minted my token. And now I should also be able to go back to polygon scan. And I could either look at my wallet address and refresh this page. And I can see that I've called the safe mint function. Or I should be able to go to the contract address. And I can see because this was a transaction on this contract. I can see here that it was, there's there's that same transaction. I can look at that particular transaction. I can see the actual data that came in with it. And all this good stuff. Okay, so I'm going to, I'm going to pause here. There's some questions coming in. Where do I get the IPFS CID. That was so this I got it from the data data ID blob publish endpoint. I'm going to scroll down here in the response body. There's a field called called blob public. And this is, this is the IPFS CID right here. And I had one of those for the image. And I have one of those for the metadata as well. Sorry, there's a question that says please share it here. I'm not sure what it is though. I'm happy to share it, but I'm not sure what's asking to be shared. So what here is open source versus what is part of Kaleidos stack. Everything that we've used today is is completely open source. The, the only thing that we're depending on Kaleidos for which you absolutely don't have to use Kaleidos node is the blockchain node itself. And that's just because it's a lot of work to stand up a blockchain node and connect to a public chain. You're welcome to use some other provider if you want. There are plenty of plenty of blockchain node providers out there that you could connect this to. But all the software that we're running on our machines is 100% open source software. It's part of the hyper ledger project. So that's that's really what we're focusing on here. When you have multiple images or documents would you have multiple public responses. Yeah, so each if you want to upload multiple files and have them each addressable as a separate file you would have different a different hash for each file. Yes. Hey, Nico, I think there's a question in discord about how long the RPC will be available. Yep, I did mention that earlier but I'm planning on shutting down the credentials for it later today because I just I don't want them floating around the internet for too long. Yeah so so the short version of the story is the running the running a polygon public RPC gateway is not a feature that's of collider that's publicly available yet. So it's a it's a feature that is available internally that we've provided just for today's workshop. Just reading through the questions here. Yeah, you can most certainly zip a whole bunch of files together and upload them to IPFS. They would always be downloaded together though and treated as one file at that point. Was there a way to do what we've done in batch form. So I mean, I would recommend writing some code to do what we've done, if you want to do a batch of them and have your application manage what does a batch mean for your application. The, like I said, the smart contract itself is going to like each NFT itself needs to be a separate transaction because that's the way the standard works. Each file upload itself to IPFS is going to be a discrete operation as well. And so so there's lots of things that are just because of the way the system works are all discrete operations. The Firefly SDK, there is an SDK for NodeJS that is, it's a great if you want to write an app in Node or TypeScript, you can use that and it's a great starting point provides easy to use functions for all of these things that we're doing by hand. So today, the workshop is really to kind of like go through it and make the make the things by hand use use all the APIs. But obviously you wouldn't want to do all this by hand in production. So this is sort of like, you know, getting hands on with the APIs to do by hand what you would then go write an application to drive and automate and build that batch functionality into does Firefly convert API to FFI to define smart contract interface generate the API. Yes, so there is a, there's an endpoint that we used earlier. If you scroll back up here. Sorry, not that far. When we generate the contract interface, this is the endpoint that does it. That's part of Firefly Core. It's really just a convenience endpoint there to help you get started with that. Other questions about Kaleido. Yeah, I so I would love to talk about Kaleido. I could talk about Kaleido all day long. This is not the really the focus of today's workshop. This is a this is a hyper ledger workshop and where today, the focus of the workshop is the open source hyper ledger Firefly project. You know, we'd love to get in touch Kaleido does have its own discord server if you want to hop in there and talk about Kaleido specific stuff. We'd love to chat with you there. So, let's, let's talk about it but this is probably not the time at the moment, but glad glad you're interested in it. Just saying their view of the sandbox does show all three columns but not the left navigation bar. This is what the sandbox looks like I'm not sure what the left navigation bar would be. So one thing to note when you when you're running in. When you're turned off multi party mode the messages tab will not show up here which I don't know if that's what you're seeing but tokens and contracts tabs are available but messages is not when when you have disabled multi party mode. All right so we are, we're almost at the end of the guide here. So at this point, we have meant to the token. It's available on a public chain, it's out there. And so the last step that I could do now. I wanted to is, I can go to my, I don't have a great way to show my, my cell phone screen at the same time, but you could use, you could use metamask for this, you could use alpha wallet. I may just use, I may just use metamask real quick just so we can see it actually show up somewhere. Hold on just a second while I pull that up. It looks cooler in alpha wallet because you can actually if, if your IPFS uploads go through like mine did not. You can see the artwork show up there and it's pretty cool. And just a second here I will have a couple of metamask account setup so I'm kind of make sure I get into the right one here hang on just a second. Okay, cool. Let me open this and reshare my screen. Alright so I've got my metamask wallet here. I've got some stuff in here already I have a little bit of magic. This one's from a previous demo. Cool. So, what I'm going to do is, I'm going to copy the address here for my metamask account now, and this could be if it's your alpha wallet account you copy it from your phone I just don't have a great way to screen share my phone and and this at the same time I know there's ways to do that. I just, I didn't take the time to set that up ahead of time sorry. Alright so we scroll down here now, now we're going to transfer the token so we've minted it, but we just minted it to ourselves so this is an example of like as a as someone who's, you know defining or creating or publishing an NFT collection. You can you can mint stuff ahead of time if you want to. You don't have to you could you do it's called like a lazy mint or you know not actually mint it until someone buys it if you want so you don't have to pay for the transaction fee. Or, you know if you needed to for whatever application you're building, you need to have just like a pool of NFTs they're already there that someone can then transfer. You could you could mint all these to yourself and then have them available to transfer. So that's that's what we're going to do in this example. Now we're going to go to the tokens slash transfers endpoint. And I would hit try it out. And we don't need all of the fields here so I'm just going to paste this, we need the sender address and the recipient address so sender is going to be my firefly address okay. Recipient is my metamask address. We're going to put that in here now. And then we need to specify the token index. So, when we we minted the first token, it was just one. So we go to the firefly explorer. There's one. And the token index was one of that's a one of that should say one will find out here I may have a typo in the guide or we may have an issue in the UI there. I don't remember. I don't remember if the open zeppelin auto index function starts at one for starts at zero I think it starts at one, because I think zero was sort of not set. I don't want to find out here because if one doesn't exist this transfer will not work. Invalid token ID okay so it's a typo in the, that's a typo in the guide my apologies this should say zero right here. But that's good. That's a typo in the guide is a lot easier to fix than a bug in the explorer but okay so we transferred token index zero. And if I go look at my firefly explorer now should see in just a second it probably hasn't been confirmed yet. Yep, there it is. Now this other address has a balance of one and my firefly address has a balance of zero. So we've transferred that token from my firefly address which is BB zero here we can see that's that's where originally went to in the mint to see for one. And we go look at metamask. I'm C for one. Metamask may need me to tell. So alpha wallet will also just automatically find the token and it shows up there you don't have to put the token address in I'm pretty sure which is great. I think metamask on the desktop does not do that so if we want metamask to know about that. What we do is sorry this zoom screens in the way here. We need to get our contract address, copy it until metamask that we want to import it. So it automatically figured out the symbol from the contract it went and looked up that contract on the chain is great. It needs a token decimal just put one it's fine. Sorry. Otherwise it's going to look weird. I think we need to put. We need to put here. Metamask is not the greatest. No, okay, I don't know. It's the balance is going to show up weird here I guess is it 18. I love metamask. This is this is wonderful. I did not practice this part of the demo I should have done that. Maybe it's, I think it just needs zero. There we go zero. Okay. Sorry, I don't know what I was thinking it imported and look there's my it says I have one of them now. I apologize for the, the confusion there. But so there's my token from here, I could actually I so I have this in my, in my wallet. I wanted to, I could actually send it back to firefly now. Copy fireflies address and but not let me do a transaction on this. All right, well metamask is just not helping me out here. I don't want to let me transfer it. It says I have one, but it's not going to let me transfer it. Okay, so anyway, that brings us to the end of the guide, hop up in the chat again here and see if we've got. I'm sure there's probably some more questions here. Yeah. Thank you for all of you are telling me it should be zero. All right. So, we have. We have another hour scheduled. We don't need to go that long. We've got to the end of the guide I wanted to kind of go through it nice and slow so people could follow along and keep it interactive so hopefully this was helpful. Thank you all so much for coming and just so many people for staying this long. This is a good long workshop where we really got hands on. I'm happy to stay on for as long as people want to for the next hour, if you have questions or want to still work through if you're still trying to figure out parts of the workshop but that brings us to the end of our planned programming so thank you so much. Yeah, so there's a question about other chains. Absolutely. If a if a blockchain is EVM compatible it will work today. If it is if it uses some other some other type of blockchain is not even compatible. They're Fireflies extensible so you could in theory create a new blockchain connector for a different type of chain entirely and do all of these same things. There was a question about access to the recording. That's a great question for either Sean or David but I believe this the recording of this will be on the hyper ledger YouTube channel should be there. I'll drop the link right now in the live stream link is here but that will turn into the recording link as soon as this is over. Thanks David appreciate that. Okay. Just scrolling back through chat here to see if there's any other things I can hit. Somebody DM to me about an error that they're getting. Okay, so the to the person who DM to me about the the transfer is to the transfers from the incorrect owner so it's possible you flipped the to and the from address there. It's also possible the from address isn't actually the right one. Or perhaps you may not have actually minted that token. A couple things to check on there. Great question on ZK tech. Yes, that that's an area that we are actively exploring. There's no like immediate plans that I can share about that right now but zero knowledge is always it's super interesting and I think is a an area that's going to be of particular interest in the future. But so it's definitely something we're looking at advice for on chain data analytics using graph databases. Great question. I'm not an expert on that. I think that is, it's, you know, on chain analytics is certainly an interesting area. You could certainly build something that can can create an on chain analytics user experience with Firefly Fireflies a thing that you could build that with. But it is not necessarily meant to be an analytics engine itself. I'm sure there are also other great open source projects out there that specialize in that particular thing as well. It's just an area that I'm not a particular expert in. Well, I'm going to check discord here. Oh, there's a question about showing metamask browser wall to show the NFT. Yeah, so basically metamask browser. The browser wallet is really bare bones in the features that it has this is why I recommend use alpha wallet. That's it's it's a lot better user experience but basically I just went here it says don't see your tokens import your tokens right here and then I put the token contract address in here. I can get that from polygon scan or from Firefly itself. And I put that in there token decimal should be zero as we as we decided for an ERC 20 token or a fungible token sometimes you'll have a number of decimal places that you have to specify here for it to show up in the UI right. That's where I got that that's how I got metamask to show that there. Any smart contract templates by business domain. Yes, I'm sure there are some out there. I've found. I think, typically, many business. Many business cases can can actually just leverage basically what we use today, a token contract. So Firefly comes with with an ERC 20 token contract and your C 721 token contract that allow you to associate data with a transfer, which is a really useful so in Firefly, we didn't get into this today but in Firefly you can send a message in a multi party network and associate that with a transfer. We found that that pattern is is really powerful and can conserve many different business domains whether it's a track and trace application a all kinds of different things. So, you know, a lot of times. That can be done with with fairly basic smart contracts and the power that Firefly gives you to link data that's off chain with data on chain. What if you want to use your own IPFS node. Where should I set up private IPFS address. I'm trying to exactly understand what that question is getting at so so yes we we actually are using our own IPFS node right now it's just running in Docker. I guess if you're saying you already have one running where where do you configure that. Let's get into the Firefly core config file, and it's just the, you need to get the IP important number for the IPFS API and gateway. And that goes in the Firefly core config file, I think is what you're asking there. In terms of identity, a workshop, yes, there, we should definitely do a workshop about identity and Firefly that's a whole. It's a big topic, it's a big topic, and there's there's lots of stuff to explore there so I think that's a fantastic idea for a future workshop. Let's see there was a question minted several images on the same token how does this differ from the minting we did today. I'm not sure I understand what that means. If you've minted several tokens that all point to the same image or if you've minted one token that points to multiple images and if it's the ladder I'm not sure how you did that. I guess how it compares to what we did today we we uploaded one image and we pointed one token to that you could if you wanted to talk a lot of NFT collections will have. You may have like like we minted a one of one today. So there's only one on this smart contract. There's only one animated Firefly pixel art. You could say well these these ones are rare, so there's only five of them, and you could point five different NFTs to the same metadata JSON, or you can say they're common there's you know 20,000 of them and you can mint 20,000 tokens and point them all the same thing. It's really up to you and how you wanted to find your tokens and how you wanted to find your collection. Someone said they got the NFT to their metamask wallet is there an easy way to transfer it to the alpha wallet. Probably. I, I'm not sure why the button to transfer it and metamask didn't light up. Honestly, I think metamask is not the browser metamask is just not the greatest. It doesn't have very many features. There is probably you could probably, if you really need to. You can export your private key from metamask and put it in alpha wallet. And then it would show up there. That's, that's another option. You could use a different wallet app. As long as you load that private key into a different wallet app, you can transfer it wherever you want. It's a question about hybrid cloud hosting or architecture collido. Yeah, again, would love to talk more about collido and all of its offerings. This is not the, not the main focus today. But yeah, lots, lots of different really cool options there. And we'd love to talk about that in the future. All right, we still got 48 people in here. So happy to happy to leave the call open. If people want to keep working through the workshop and people are still working on it. Happy to hang out if people have questions still want to dialogue. I have a question about integrating capabilities to connect the NFT to enterprise systems. The question is, what does that mean? And that, I guess that would be my question as well. There, I guess one thought on that is, you know, we commonly, most people when they hear NFT, they think, Oh, it's a, it's a GIF or it's a, it's a board ape or it's a some goofy pixel art of a cat or something. Something along those lines and really what an NFT actually is, like you saw today, is just a unique identifier on a blockchain that has ownership that has provenance, and it has traceability. So it has a history of the ownership, and it points to some piece of data that may live off the blockchain somewhere. And when you think about it from that aspect, there are lots of really good business cases that you can use for that. And so, you know what one of the other challenges is in the public space every time you transfer that NFT or or perform a transaction with it it costs that blockchains native currency in this case of cosmetic in a private chain. You could have a gas free system or or where the price of gas is free. And so that means you can, you can make as many NFTs as you need to for your business application on a private chain. You could transfer those freely between members of an organization. You can even using Firefly you could potentially bridge those NFTs to a public chain in certain cases when that was necessary so there's a lot of different enterprise applications to the things that we've shown here today. You know, most people initially think of an NFT is just an image well it's it's actually, I would say the common use cases for NFTs that we've seen on the internet today are just the tip of the iceberg in terms of what is possible with the technology itself. So there's there's plenty of things that are, I think a more useful business value that can be done with an NFT. So some other questions here about encrypting or decrypting attachments posts to IPFS potentially yes I'm sure there I know there are some projects out there that have have done things with that. It's not in the scope of what Firefly does today, but it's very possible that you could plug another tool into that and use it for something that is more important than a silly picture. It's also probably worth thinking through like is, you know, is the data too sensitive that it shouldn't even be shared, even in an encrypted form publicly like that, or within a multi party network. If it's too sensitive to be shared with all of the members of the multi party network, perhaps sending it directly peer to peer might be better. While still using blockchain as the distributed ledger and proof of that transaction that happened while keeping the payload itself completely private. Someone asked about if s3 is suitable for this. Sure. Yeah, you could write so there's one. So, like I said, Firefly is very pluggable. It's very modular architecture. You could. So there's one plugin today for shared storage, but you know if you read through the code in Firefly you don't see a lot about IPFS. It's really we call it a shared storage system. There's one implementation of that plugin today and it happens to be IPFS but you could most definitely create a another shared storage plugin that leverages s3 or some other sort of distributed file share system and use that as well. All right, any other questions. Thanks. Appreciate it. Any plans for the hybrid cloud. Yeah, so I mean collider definitely has very flexible hosting options. It's something you're interested in learning more about it definitely encourage you to reach out to the sales team and they more than happy to talk through the different options that are potentially available there. There was a question about how to point to s3 buckets for the image you arise. Yeah, so, so this is also something I've seen in some NFTs where the metadata JSON goes on IPFS, but it, instead of that IPFS resource pointing to another IPFS resource. The metadata points to s3 and you can most definitely do that. I chose not to do that because I wanted both the image and the metadata to be immutable and distributed. So I chose IPFS for both of them. There's a question about in discord about RPC endpoints. Yeah, so chain list lists nodes that are its status list nodes that are up and available. That doesn't necessarily mean that they support all of the functions that the that firefly and the EVM blockchain connector need to function. If you look at the EVM connect read me lists the the different RPC functions that it needs to actually run, not all free public nodes support all these functions. This is why we ran one today that that I know 100% supports all these functions because we're running it. But if you just do a search for for free public RPC nodes. It may be up and it may support some of these. It may support all of them. That's great. You're welcome to use it, but it's sort of. You just have to have to test it and see if it actually works is not all of them expose all of these functions because some of them can be more resource intensive than others. So that's just something to watch out for there. I'm sorry, I thought I was sharing my screen still. Let me let me drop the link to that. Read me in here. All right, give it another minute or two but if folks don't have any more questions and we can, we can close this down here in just a minute I think. Happy to keep chatting on discord. Again, I'll drop the link to go grab the link to the discord there if you want to keep chatting. Happy to love to connect with you there. All right someone find the cut up yay. Let's see. There is a question in chat about how we can store on on s3 and maintain immutability. I don't know. That's why I didn't use s3. There may be ways to do it, but that's probably needs some really deep architectural investigation into how s3 works itself. I, I don't know. I don't know if that's even possible. Definitely something to explore though. Thank you everyone so much for attending. There's a question about quorum. Yeah, Firefly works with quorum as well. Thanks everyone for attending I think we're going to go ahead. The questions are slowing down here. If you have more questions in the future would love to connect with you in the Firefly discord. The workshop was was useful and informative that the guide will stay up there. You're welcome to plug in whatever RPC node you want to after today. I'll update the guide to have a note about that. But I just really appreciate all the time that everyone put into today's workshop and for taking the couple hours here to to sit with me and use Firefly and get hands on. Yeah, thanks for for joining and hope you have a great rest of your day. Thanks Nico thanks everyone. Thank you David thanks for facilitating and organizing everything really appreciate all your help. Yeah, of course, happy to help. Yeah, thanks everyone hope you got a lot of use out of that. David you need me to do anything on my end to shut things down. I'll close it in just a second. Alright, thanks so much.