 All right, I think we'll just get right into it since we only have a 15-minute slot And I think we are right at the top of the slot Welcome to a firefly demo. I My name is Andrew Richardson. I am one of the maintainers of hyper ledger firefly and I'm also an engineer at Kaleido We have a booth upstairs. So if you haven't stopped to talk to us about this stuff, definitely stop by this afternoon We'd love to meet you all more one-on-one If you have not heard us talk about firefly yet firefly is a web 3 super node It's a set of building blocks and developer tools that sit Above your blockchain technology and make it really easy to build applications on top of that kind of taking all the Confusing bits out and just making them really really easy to work with so that Organizations and enterprises and and users can get to building applications quickly We've talked a bit in a lot of different panels about the different things firefly can do and this panel in particular I'm giving a demo to focus specifically on tokens right fungible tokens non fungible tokens. They're kind of the bread and butter of most blockchain Ecosystems and firefly makes it really really easy to deal with them So I'm going to jump straight in And I have started by setting up a local firefly development environment Firefly comes with a lot of tools one of them being a Command line interface for setting up a local development environment makes it really easy to kind of bootstrap and get started with a real blockchain You know before deploying anything in an actual decentralized system So what I have here is I've set up three local nodes. These are going to be geth ethereum nodes But we that's just kind of the default, but we support bezio. We support fabric So what I have here is these three nodes And then I have a UI for each one where I can explore what's going on in that node So this is the firefly UI you can see in the right here node zero node one and node two And they all Let's see. They are all in a consortium together So you can see this network map where the nodes all appear as different kind of bubbles in this decentralized network So I'm going to start I'm going to go through both tokens on a private consortium network and on a public ethereum network I'm going to start with the private because that's what firefly 1.0 did as we announced yesterday We've got firefly 1.1. So we got some cool stuff in the second half of the demo as well But starting with the enterprise world. I want a private network I have a couple members three members here and I want to mint tokens either to track Some form of currency for payment or to track some sort of NFT for tracking assets maybe moving between corporations I'm going to start with the firefly sandbox Which is another tool that comes out of the box. It's really really nice for prototyping your use case Can you guys see this screen? Okay? I don't know if we can we can't dim the lights. Can we it's kind of The dark mode doesn't translate to this Screen maybe I'll just try making it bigger Hopefully that's good enough So I'm going to start in the sandbox on this tokens tab, which basically helps you bootstrap Okay, what are the simple things I can do? with with this network The first thing I have to do is create my token firefly has a functionality called creating a token pool It's a pluggable concept, but in the network that I've set up It's going to mean actually creating an ERC 20 or an ERC 721 Depending on if I want a fungible or non fungible token. So I'm going to start by creating a fungible token I'm going to just call it hgf coin. I'll give it a Symbol and I'm going to leave the rest blank Which means that firefly is going to create me and deploy a new ERC 20 contract so it shows me the JavaScript SDK code that I could use in an actual application here But I can also just run the code snippet directly I get the events back that tell me the token pool has been created successfully. I can then Mint a token in this pool so I can select the pool I'll say I'll mint a hundred tokens my default ERC 20 has 18 decimals So when I put in a hundred here the sandbox is helping me out. Thank you Now we have the dark mode The sandbox is helping me out by actually following that hundred with 18 decimals so you can see kind of the the Parallels between what I want to do and then the code I write and then actually running it and seeing how it executes So I'm going to run that I'm going to mint a hundred tokens to myself And now I can go over to the firefly explorer and kind of check out what's been happening This timeline doesn't look as good when you're zoomed in So this is on node zero just the last couple things that I've done in my activity timeline So I created a token pool right called hgf coin That was done by broadcasting a message to all the members broadcast messages are a combination of on and off-chain messaging So firefly kind of abstracts that out whenever you want to share a piece of data with everyone in the network it Broadcasts it to them It puts the public portion of it in IPFS and then writes a blockchain transaction pointing to it So all these members are going to have a token pool confirmed a message and a token transfer confirmed If I look in their timelines, they all have that token pool confirmed token transfer confirmed So the whole network gets a notification that these things have happened and then if I go to the tokens dashboard I Can see the balances so my account now has a hundred of the hgf coin and that's available to anyone in the network to see I Can then do a transfer so if I want to take that coin and transfer it to another recipient How about we transfer it to someone off the network I'll transfer it to my metamask wallet because you can Probably familiar with metamask for tracking your your ethereum balances and such so I'm actually going to take and find my token pool and Get the token details. It was the address where that ERC 20 was Was deployed I can go in here and tell metamask a import this token It actually reads the data from the ERC 20 for the hgf coin Import and then I'll go back in my metamask address and I will use the sandbox Transfer to that address. I'll give 10 of the tokens to that address and actually instead of running this one directly I'll show you how easy it is to bootstrap an application. I've here set up a very simple No JS application, right and I want to transfer tokens as part of this application. I Can just take that code snippet Put it right in here I'll log the return so we can see that it's exceeded and then if I run this It's going to run that code snippet and it functions exactly as we've been seeing on the sandbox It gives me an ID for my request so I could check on the status of it But I think it's confirmed by this point So I can just go back to my token dashboard and see 90 are in my account 10 have been transferred to another account And they have the 10 are in metamask So very very easy to both, you know bootstrap your commands and then go straight to source code and start writing your application and your business use case Very much the same for non fungible. So before we move off of the consortium I'll show you just exactly how to do it with non fungible switch this over Say we'll call this one hgfnft I'm again going to leave this blank to tell it to deploy a new contract in this case It's going to deploy an ERC 721 and once it's deployed It's going to send a message to all the members of that consortium saying, you know Here's a new ERC 721 the symbol is this the address is this and everyone implicitly is going to add that so here's my Node zero here's my node one not dashboard blockchain dashboard for tokens I have two pools. I have my hgf coin. I have my hgf nft All right So very very simple to not only do the blockchain operations But kind of do the off-chain stuff that you also need to do in this multi-party consortium to make sure everyone's in agreement about the The constructs that are in play Let's see we can go ahead and do another mint when you're minting an nft There's a construct called a token index and we've picked tried to pick kind of generic names for these things because they can map to Different smart contracts differently, but in this case, it's you know the individual Identifier for the nft that you want to mint and everyone has to be unique. You can't mint the same one twice So I'm going to go ahead and meant we'll just mint Token 1001 and why don't we do another one in the source code just for some variety? So I'll put this in here. This is actually going to be called mint So I'm going to mint an nft here. It's going to go into my default Node wallet and if I go back to the firefly explorer go to my balances I see that my wallet now has nft number 1001 for this hgf nft pool Transferring of course is just as easy and I think this time. Let's see. I'll transfer it to Another member of the network. So let's say I'm going to transfer it to org one So I'm going to get his Ethereum address For his wallet so by default each node comes in with a single Ethereum wallet you can add to that and you can kind of layer on top any other native ethereum Technologies, but everyone gets a default wallet. So I'm just going to use that here So this is the address for org one I'm going to give this token to him and this time I'm going to attach a message This is another really powerful thing that firefly allows you to do By sending a message alongside the token because we find a lot of times if you're transferring an nft You're transferring some tokens. You want to include some data with it to say the reason for the transfer as such But often you don't want to put that stuff actually on the blockchain So this gives me a way to send an off chain message But to pin a proof of that message alongside the token transfer on chain. So I'll say Thanks for attending say maybe this was a digital swag for coming to my panel Right. I'm going to transfer it from org zero to org one And I'm going to make sure it's only visible to org one and not to org two So you get a slightly bigger code snippet for that and I'm going to go ahead and run it There we go If I go on node zero go back to my tokens dashboard I can see there's been a transfer and because I'm the sender of this I can also see that there's a message attached to that transfer If I click through to the message on the value of the message is down here This value could be string json files, whatever. I'm just kind of using something simple for the sake of time And org one also Similarly can see the transfer here and can see the message but or two the because it was a private message they can See the transfer, but if they try to see the message, it's not available, right? So the message is off chain. It was not delivered. It's not shared publicly on the blockchain Just one last thing and then maybe we'll have a couple minutes for questions Because I did promise that I would also show public chain, which is kind of the exciting thing That is new in firefly 1.1 So I'm going to hop back over and show you on node zero I actually have added an additional namespace and this means it's a separate space for me to talk to potentially different blockchains Um, I have added a a connector to polygon Mumbai test net So this particular node is going to be talking to that test net There's no tokens here now, but I have a token contract here that nico deployed yesterday as part of a demo So I'm going to reuse that I'm going to say that I'm going to create a token pool using that And I will grab the starting block when that contract was created Generate myself a code snippet And it is a fungible erc 20 and I think it's called ffc for firefly coin I'm going to copy this code snippet Come back to my source because there's one other thing I have to do And that is to change my namespace to go to the polygon namespace and you can see just how easy it is To talk to a different namespace different blockchain using the same Constructs I've been using for the rest of the panel This one's going to take a little bit longer because it's submitting to a public test net. There we come We got that probably take a few more seconds to get the actual confirmation But let's see there it is. Okay. So my token pool has been created It's going to start indexing that And we should eventually see some transfers here. We'll see it might take a few minutes But it's going to go back. I told it the from block where that was created It's going to start there and crawl through and index all the erc 20 transfers And it's as easy as that to do it private or public So I think that is the end of the content a bunch of things I just showed So we have a few minutes if you have any questions or anything else you wanted to see. Yeah The ledger so you would see all of the blockchain transactions, of course Which in this case all the token mince and transfers are all going to be public, right? You can see all of those And then the messaging you would just see basically hashes of any of the message data, right firefly the way it's configured We don't put rich data On the chain we put data off chain and we put a hash to prove We could get into that for a long time I would contend that in a lot of enterprises You actually want auditability of the fact that the transfer happens You may want to obfuscate the sender and receiver using something like hd wallets So that the ethereum address can't be traced to a single party And and many other options we could get into and would love to kind of have a more extended discussion, but yeah short answer is Usually we find that it's it it's actually beneficial to have the transfers themselves in the public chain Not as it exists now you yeah, I guess Yeah, I guess the the bottom line with any firefly question is but it's pluggable So if you wanted to plug in tesura or plug in something with fabric or you know Then you can write the plug right exactly any others So I set up a a private network here and it's running entirely on my machine right So I have geth node and everything kind of for three members So this sandbox is pointed at the private network Which is why I did the public ones in source code to point it elsewhere It's in the api call is I guess the short answer that you tell it which which exact namespace to talk to and in this case I didn't go through the setting up in the configuration of the namespace because it's kind of dry and a bunch of yaml But yeah, you tell it, you know, okay. These are The the api endpoints to talk to for talking to my private network This is where my p2p data exchange is is where my blockchain is Similarly for the public network and you maybe one more. I think we're just about it. Yeah um You could if you kind of implemented a custom smart contract, right? I've shown a very simple ERC 20 contract here, but yeah, the the limits of the contract are Up to you, right? So if you if you create your own ERC 20 as long as it conforms to a contract that firefly understands Or a contract that you teach firefly to understand by plugging it in Then it you know the contract will still behave however you've prescribed it So you could add your own access controls and you know approvals and rejects and all that could be in there And as long as it still emits ERC 20 ERC 721 or ERC 1155 events or anything else that firefly requires in the future Firefly will know how to index it. I think are we at time? All right Well, I think with that we'll stop I'm rolling right into another demo So feel free to stick around for the next one, but we wanted to time box them into two different sections Um, and of course we'll be upstairs at the booth Tonight and at the Guinness Storehouse to stop and chat if you want to have a longer talk about it