Chainlink Workshop with Solange Gueiros from Chainlink by Solange Gueiros

ETHDubai 2024 · 20 Apr 2024 · 56:33

Solange Gueiros leads a workshop introducing Chainlink technology.

Speakers

Topics

From ETHDubai 2024, hosted by DeFi Dubai.

Transcript

uh so my name is Sol Gus you can call me so and I am a developer Advocate at chaining clubs I I teach how to use out the chaining services and I used to go to uh out the conference to do that I love to be this in person and I have with me aashi could you introduce yourself hello I'm AI I'm training developer expert I'm assisting so today with doing the technical Workshop yes and Amish what is uh developer expert tell them please so developer expert is a program we have in chain link uh part of our community that allows the technical ones of you to join uh run your own workshops uh boot camps online

hackathons and help uh essentially grow the chaining developer Community yes it is so if would like to help us and be with in the future you can be a developer expert as well and I know that this is the most important slide for you so if you'd like to have access to this presentation later I have other links other information over there and I know that everyone is like would like to take pictures a lot of pictures if you get this you have everything it seems everyone did it one more over that two okay let's go so uh like I told you

before this is a a handson session and I'd like to interact with you so H I'd like to you to go to this website you can type this or take a picture and then go over there or if you have the presentation only click on that is pet. riseup.net SLP e duai one minute more how good can I go for it I'm going

yes take a picture then you can type later yeah are you go over that as well let's see I oh I already have this open it here and let's go over there yes welcome VMA and Bruno and I'm here I am from s Pao Brazil oh we have Pedro from Santa wow more Brazilians here I'm so happy yes and G G Gideon from Ghana wow

Ahmed and hanata welcome welcome everyone uh like you are doing this now and I miss tching the presentation and we come back here a bit late okay so let's continue I must both both open our time because I go H so I'm here to talk about chaining and chaining it's a Oracle so what's Oracle Oracle is the way that you can connect with any information that is outside the blockchain and can be like codes or data but also can be temperates the

information from my watch or my steps or sports or uh any kind of weather and financial information so this is the basic the concept of Oracle but when we talk about oracles it's so important that uh this the information come from a decentralized Oracle Network used to say that this is a Dawn and why uh the way that we have the information inside the blockchain it means that the the input of the information is the most important part because if you have this information in a wrong way you how can you trust in the blockchain after it

will be hard so uh if you have a decentralized Oracle Network to get a decentralized consensus you can guarantee to have better information even if the S is unique even if you have a centralized se you can have more than one node or one person getting the information and guarantee a consensus to retrieve the same information before save on chain and this will make the difference when we talk about decentralized oracles and this is chain link chain link is a decentralized Oracle platform

H we are not a blockchain we are deployed we have our services in different blockchains and we are this we have different services and amsh could you tell them what is a data feed so chaining data feeds essentially allows us to bring offchain data this can be price data um and we bring that offchain and we deploy that onchain um so for example let's say you want to know what the price of the BTC to USD PA is we can now uh provide a data feed using our Oracle Network work using paid um uh providers and apis aggregate those data and bring that on

chain nice thank you and uh data streams is almost like data Feit but the data Feit is pushed based like it's updated uh from time to time or when the price change some variation but data streams is pool based it means that in the moment that you need that price price you get the pricing exactly that second and this is the difference between them also we have a vrf that is to Generate random numbers outside the blockchain and use then in blockchain to be sure that this is not manipulated and aashi what's functions so chaining functions

allows you to execute JavaScript code um using our decentralized Oracle Network so essentially your smart contract trigger request to our Network and you can have any arbitrary JavaScript code that you want to run maybe you want to query your weather API maybe you want to get Sports data you can add that to your functions code and and interact with that directly from your smart contract nice nice also we have a proof of Reserve this is another kind of data fit where we can prove you reserves from some asset including to get some balance of a bank account and save this information inside the SM

cont that you can consume and use in your own SM content on your own uh decentralized application andash what's automation chaining automation as it as you can probably describe allows you to add automation to your smart contracts so you can set various triggers within your smart contracts whether it's an event log maybe you need something similar to a CR drob so on a Time basis um and you can trigger that from your smart contract and it will automatically execute yes so this is a overview what's the chaining platform and now CCAP I you go deep on CCAP so we can do this together I already told you that chain

link is not a blockchain but we have our services in different blockchains many many blockchains and if you'd like to check more about all the services I recommend you to go to devel ER portal because you have use cases you have the documentation everything is over there you already have the care code of the presentation so we have everything and this is let's talk about CCAP the chain link cross chain interoperability protocol uh it's important to you to know that a blockchain it's a isolated Network it means it's a Iceland uh we don't have a native way to have

communications between the blockchains and uh okay we have some bridges that do this kind of communication but if you do some researches related to the bridges past year for example you can find a lot of hack so chaining CCP can be used like a bridge but it's more than this and to have a high level idea what is this uh we have the CCP in the middle but we have a a cersi blockchain and a destination blockchain in the cersi blockchain you have you that is interacting with some decentralized application this

application is sent some kind of message to the outter and then inside the CCAP part we have decentralized notes we have in fact three decentralized Oracle networks we say da three different Don that take care of this so they have segregate rules to do that to guarantee the security part that is the most important part and after they do out of this security stuff we have the hter in the other side the hter are iSmart content that you deliver the message in the other side the message can if it's a

token can go directly to your wallet but if is another kind of message must go to another is content on the destination blockchain and what's a message a so a message is essentially what you are sending from one chain to another chain when you're using ccip so a message can consist of different fields so what it can have data so this is just B data and then you can also have tokens like Salan said you can send tokens cross chain and then you can also include in one message you can include both tokens and data nice and this is I told you that we

have the sender that can be you or another smart contact also the receiver it's an interesting point because the receiver can be your wallet directly but every time that you have data must be accounted with this the CC receiver because this code that you be prepared to receive some information from the CCAP Network and what is thees so the router is the contract that you will be interacting with um whenever you are sending your ccip message so every chain has its own router contract and essentially to send a message

whether you build your own smart contract or whether you interact with the router directly this contract is responsible responsible for omitting the event that is picked up by the central Oracle Network to process your ccip message amazing and this this I you pass this and do a overview of the capabilities of the CCP and then we are creating smart Contex so like you said before we can do only token transfers we can do any kind of message like a hello Dubai and you can do mix this we can do a programable token transfer it means that you can transfer an erc2 token and then

tell what would like to do with the this token in other chain imagine that you can deposit this token in some place to use like a collateral or you like to do a swap or You' like to do some other transfer or some operation you can do whatever we'd like to do with your token and when we talk about messages the best use of a message can be col a function in the other blockchain the destination blockchain we are doing this today because today we are creating an nft then we are minting an nft from one chain to another chain this is our go

today using our computer and even if I have more slides I'm going forward for that now then I can go back let's go so uh your requirements to do that is like to have metam mask installed and I copy this to our pad just now and sometimes I have problems here but is okay let's only update that and be sure that you have everything here so this are our requirements to have a metam mask we are using Fuji so in some minutes we are set up the Fuji

but for now I have here my personal notes that I copying and paste for you in metamask is important to we are doing this on test net so it's important to you to come here and enable the test networks to see seia over there and uh if you need the linky token as well I have a special fet only to us here to using the workshop don't tell outside please this is only for workshops and I know that you need a password for this this is a a secret pass password to use now okay and on

this fet you can add your wallet and get on seoa a bit of it and a bit of link if you have it I didn't so let's see yeah it seems that if it's not working I can add some links here in a few minutes for you and let's go a bit forward so if I have my metamask installed and everything it's okay now I'm going to remix so I'm not installing nothing more in my computer and only remix I must have this I used to have this solid the compile enable and I connect my wallet let's do that here is

remix it's good for you it seems yes so Havey out compile enable icon number four you help you then icon number five connect my wallet so I change the environment to the injected provider here we are this is my wallet or should be it seems It's not yeah I must connect this wallet because I using an another now now yes so I'm sure that my wallet is connected now I'm creating some smart conts here and I don't have anymore I lost all my conts oh this is table let's get the contracts

again and I share this with you because the contracts are here okay the first Contact that we are creating you'll be the cross chain price so this is a um nftg that is getting the price of Bitcoin in that exactly moment and create nft of that price and the background color depends on each blockchain I am so I should have a picture of this yes it's this so this be our project we are creating

nfts the background color is the cersi blockchain so this will be uh ethereum this will be Avalanche this was Mumbai but Mumbai is that and we are preparing the other network so let's do only these two now okay and this this in order to create your NF let's get the code for you cross chain nfg and are you adding the pad that uh can be easy for you so if I copy this you can copy what I add here between the beginning and the end okay I must do that so let's do this from zero this is

the code okay the name of my file is this I be on remix create a new file second icon and create this and copy and paste like you I copying directly to be faster here we are yes you must Trust on me now on my code but we are learning together so you can trust it's only test net as well and okay this is my content let's deploy it and deploy I came back to the icon number five deploying theun transactions and yes I have a

transaction here to do it oh now I can see that I missing over there good so in a minute I have my content I'd like to see if you are doing with me so if you can add here your your name and the address of your nfg I'll be happy to know if you are doing this with me let's see mine is here like the I add contracts copy and paste for you is someone doing this with me let's see maybe yes maybe no I'm missing some

computers over there I'd like to see your nfg okay next if I have my nftg I can see my nftg on open c as well so if I came here on test Nets open C and search for my nft address let's get it again the NF address search on open SC here we are we just create this yooo is that the first nft is always happy because we are starting from zero to the first price so I like to be happy so the nft start always

happy and this this you can see that what was create one minute ago it's real okay now I'd like to have another blockchain another chain meaning this nft remember that this will be a message so I must have a receiver contract inside this same blockchain let's do this now how can I do this I have some Min uh tests here that I'm not doing now now I'm creating a second content that you be this oh let's get my collection for you if you'd like to see my collection

later is this and this is uh so fun because you can see that we have more than 1,200 collections it means more than this amount of students did workshops this is nice I love this and let's go forward so now I'm doing the second content and I must create that with you as well so we are here I must create the destination M the contct who will receive the message and here we are let's go to remix create a new file again this is the destination

MN I added for you this the destination m is this so we have this you can copy here but I you copy directly to you here okay but you it will be easy for you if you like to select and copy here I doing the same and why yeah everything is open now here let's deploy the destination Minter icon number five again in order to deploy my Destin na Min I must pass the parameter that this is my nft so copy the nft address paste in the

deploy parameters and then deploy click on deploy and are there someone doing with me or no or I'm alone are you follow me how can I know this H it seems that I am alone oh I'm happy when I have people doing it yes you are not doing with me okay you can do later so let's see what's happen now uh J is are you add all of my contract here so if you'd like to use my contract my

contract are public and you can use this as well so let's get my contract here we are and you have this then so my contact is ready to receive a message and to create an nftg let's check it out first first I you come back to the nfg to explain a bit more for you on my nft my nft has some indicators some emojis that you you define the price then I create a chain stret that the it's a list of the Str zero is the the eum SE they stretch number

one here no not here yes here it it will be Fuji so now we have zero and one the two is not working anymore okay and I'm using the data Feit that amsh explained for you so I'm getting the price of the Bitcoin in USD and Save is inside my nft and my emoji is changing uh based on the prices if the next time that I meain nft the price went up I will be happy if the price went down I be set or if the price is the same I you be like uh neutral and this is so interesting because I'm

creating this uh out nft on chain so I cre they made it on chain this is a different and interesting point as well and here I only do a test with my cross CH C because I do this uh test message with you and what is the test message this will be the same message that I'm sending from the other blockchain in a few minutes but I'm sending now here to you understand what I have so this is the test message where did you build

SV update me compare price so this is the price oh I am in the wrong place I must be here in the destination what did the destination do the destination first of all it has this so if you have a Content that you receive a message you must have have this underscore CCAP receive function and this is using the message inside my Conta what to be my message like I told you I have this local so my message to be this receive it the function mint from an address and the

chain the chain zero here is what we are doing because this is in the same chain okay and if I come back here you can see that I I have the mint from over there the mint from do exactly this I do a safe mint using that chain and here you can see that I updating the metadata and I creating the out nft the meta data and the SVG live inside the blockchain and this this this is the uh seoa part now I let me going to Fuji and if you'd like to follow me I add the

instructions for you as well now I'm going to Fuji and create this another content for you it will be this okay if you don't have a Fuji here yet probably you don't have it I added the instructure at the beginning so in order to go to Fuji I can add this for you down again again because you must uh go here to go to Fuji and you can directly connect your wallet and add the Fuji to metamask I already have it so I may go here on metamask and change to

Avalanche fushi here we are I am in avalanche Fuji now so I I can create cre this new contract now if I come back to remix you can see let's create first create a new file not here create a new file now is the Crosser CER this is the cont that you sent the mint command to the other blockchain now I am in another blockchain and let's copy it not the destination let's copy copy this C who is

sending and copy to you and for me for you is here it should be easy for you and here for me and here we are so in order to deploy this when I change my my my network on metamask now you can see here that I'm not on uh anymore this is Fuji network and to deploy this contract I must pass the address of my other content that is in seia so the cross destination me who is on seia is the content that I passing

here now in the parameter this contact is ready to receive a message let's deploy it and then I explain to you as well and by the way remember that I create one nfg so let's see if I have a two here now two Blues because both was yes two blues and the price didn't change so it's a neutral face now and now I have the Crosser ciner and uh let's have a this I know that you are not doing I am

alone you you are not follow me now I'm sad because you are not follow me you couldn't do this with me fast oh okay I think I can go with low uh where are you now okay so I know that uh because I have only one hour uh I am a bit fast but I can go uh I can come back a bit let's come back a bit I can so let's riew this did you create your nft okay did you have a

sepolia okay perfect so if you have the seia you are so you are here creating your nftg this is the nftg file and you copy and paste what is here in the middle of this okay how of this is the nft until you achieve the end so here this is the nft that you must copy and paste until line two 132 and VMA you did it amazing and do you have more people creating

NFS I know that I have a che over there they are trying I may going forward and then I come back again okay I can go to the both places and uh so if I am in the destination blockchain like I am now I can use this content to deploy to Mint my n in the other blockchain so how can I do that

here I can uh click but uh uh could you explain about the fees where I pay fees when I may doing this kind of things What's happen to pay the fees so when you execute a ccip transaction as you know uh every blockchain use has it own native so that's separate but for ccip itself since we're using the Oracle Network to process it you also have to pay an additional fee uh using link um and this is paid directly to the nodes that are processing your ccip transaction nice so H if you are in the

Fuji part you need Fuji tokens as well and if you need that you can get the Fuji tokens in our fet to if I came to the falet and I know that the fet seems that didn't have nothing let's send something to the F to be sure that you can have both of this okay let's see how is on Fuji yes F I have a lot of AAC but I don't have a link I can send some link to this now and I may showing my secret now I have another wallet plenty of tokens that I use with the fet when we need that but look at yes link is here let's

have some links to you so I adding Link in the faet okay probably in a few minutes if you came here yes you can get a bit of aax a bit of Link are you do the same on uh SE now to be sure that you have tokens I me come back to the other network and

send again I sending to the fet um 50 it's too much 10 to the amount of people that we have here and I must also send or where is my link token I don't have the link token here o but if I come back to the what I share a few in the beginning like here probably I can have I can add use this to add my link token okay so add link

token and you don't need link on seia because it's the destination chain like AI told you before you only need the link on Fuji but to be sure I add a bit now for you in both you don't need it is only if someone would like to get okay so let's see if now I have the link to send a bit to the fet no because I am in the wrong place let's get the address again and I giving you time to you finish this part and then I come back

sending a bit of Link 200 again and who else is meaning the nft who minted the NF raise your hands oh yes at least you have more are you good now with the nft yep okay let's go for it so it seems that Al are good remember that we first did the N part then we create the destination Min The second contract that is ready to receive your message we start here we create the

nft then we are over uh a bit down yes we have Lumber and FMA congrats for you now we create the destination M this is the content prepared to receive a rece a CCAP message and here we are this is the content yes VI is here as well amazing where are uh our other friend do you need the help yes uh could you amashi or ties help we have we have people that need help okay raise your hand again if you need help yes one over there another

here at is yes thank you yes thank you for my friends from chaining clabs that are here to help you this is amazing and uh Amon I think he needs help as well yeah and we have one more and remember that you only need uh link on Avalanche fui so I going to avalanch Fuji now again do you need help to add thean Fuji

or are you good on this part good okay [Music] yes and before I'm mewaiting our friends a bit are you explain more things about ccip related to ccip so where we are now and what we are doing come back in here

yeah the that application was found used to have to have happen when we don't have tokens in the faet probably yeah the children has some problem here but the Fuji seems to be okay yes some people got on Fuji you can do the Fuji part so for the people that yes work it yes if you have that error that internal application error in the fet try again and uh get the tokens on

Fuji and for the people that needs help uh I you add uh placing the pets to you to add your wallet so why you do this in the beginning like after you did this that that part do you need tokens so I'd like to know your name wallet and what you need like and if it's on Fuji or

sea okay and then our friends will try to help you here add your name and the wall your wallet here yes like hanata what you need SE okay I helping hanata now I AMX let's go to seia to help you 0.1 it's enough for now hanata you should have your token

where are you hanata you should have your token now okay perfect amazing so are you explain a bit more and then I I'm going forward at least a bit I go to the end and then I come back to help who needs it okay so let's come back here traval Fuji and I was going here to show you Sophie what you did we uh we start at the end okay so we create the destination part we create an nft here and we created this application this is the destination is M counted all of this was on

seia now on Fuji we did this part so this is the Minter now we are using the Minter to Mint an F that you appear in the other blockchain so this is the cinter that we are doing now and the destination m in the destination blockchain we have the nft and the destination M prepared to receive the message okay and what I'm you doing

now you you saw that I created the the reer and if you didn't create you and you'd like to use Min you can how you can use a money if you get my address in the pet oh now we are good you have more people here uh if you have here that you have the me the destination Min now you can mint on seia but before that I must have tokens on my contract I you do this part and then help the people that needs more help I do this now I'm sending five

links to my contract okay let's get my contract here let's see if I the Right Network yes tokens link I am in the wrong account let's go to the right account on that account I don't have a link oh let's get the link again and Link on F and now I can send the link to my smart content and do the transaction the transaction is do something I need

something like 4 minutes so I must do the transaction now to finish on time like five links is too much but let's do that Amash are you sending tokens to the people I thank you so is this when my con is confirmed so now I know that my contract has token if I came here and get the balance of my contract add the address of my contact you get the link balance I have five

it's more than enough I you do now the most important part me and remember I am on Fuji I clicked Mia and confirm is on metamask confirming and you can follow me like that like how I add everything to you here okay and I add my transaction because you can follow my transaction if you could not do everything at least you can follow my transaction this is my

transaction copy transaction ID paste here and I checking this transaction now on the CCAP Explorer let's go to the CCAP Explorer and I must get my transaction again and paste in the CCP expor to se sheet this is my transaction here you can see that uh the Serv is finalized did you know about the the concept of be finalized in a blockchain it means that we must have some amount of blocks after the block

that my our transaction is to be sure that the blockchain you not have a he work and your transaction will not disappear like your transaction is really immutable so this is the C finalized moment now it's blessed the moment that is blessed it means that how the uh the his management Network approved my transaction so my transaction is ready to go to the other blockchain and in a few minutes this will be read meanwhile I'd like to go here and explain to you that uh Network that is

here here is good so what I have here remember that I told you that I have three different networks that take care of this we have the segregation of this so I here I did the SE the SEC the hisk management Network checking my transaction this is the blessing they approving my transaction also we have the committing done that propos my transaction to appear in the other blockchain so the commit don't propose the hisk management Network check if my transaction is good in the C blockchain

if it's not manipulated if it's not a double spend if you don't have any problem over there and then the executing done it's another decentralized Network you execute the transaction only after the other networks did our their part and here we are we are in the destination blockchain we are not using a token pool because we are not in to uh doing token transfers now but the hter already you sending is sending in this moment my transaction to my receiver contract and talk a bit more about the risk management

Network the hisk management network is the most important part of CCP because here we can see if you have it's a bit small but if you have repeated messages or if you have a double spend or incorrect amounts or no matching cross chain messages like a transaction that is one side and is not in the other side something like that okay and this this probably if I come back now to my uh CCAP transaction it's done let's see I hope so and here you have more information related to the hisk management Network this is the most important part

let's go to the CCP explor y we have the success message over there so let's update my collection let's see my nftg and here we are we have a red Emoji this red Emoji is because it's came from the Fuji Network the red background is Fuji the blue background is sea it's is still flat it seems that uh especially on test Nets the we didn't update the price so frequently so because of this it's like neutral but you can see that

this was uh done now let's be sure to confirm it this with you so if I came here you can see that it's minted three minuts three 3 minutes ago so how good and uh here we are we with our cross chain nft uh we have I have another Workshop that I didn't hear but the information are in the slides as well if you'd like to try to use a CCAP to transfer usdc you can do that in another moment we have this for you later and also I'd like to talk about you this okay uh we have a we just finished

a online chain link boot camp it was it happened two weeks two hours per day so it was a bit extended and we started from zero create your wallet your first smart cont and all the chaining service like create NLC token using data feed create nft using three different uh Services if You' like to do it it's available online so you can still do it okay uh I know that here it's a faster Workshop I used to do this Workshop in two hours uh when I do in one hour I must run a bit and uh I'm sorry if some

of you was not with me all time but we are here we can help you during all the day today and tomorrow and if you are in the hakon we can uh Mentor you and tomorrow I will be seeing the projects okay and and some people used to to ask me how to work at chaining clubs uh this is the career page so if youd like to to be with us feel free to be over there and remember that H our these are in this presentation let's share the presentation with you so if you missed any link anything that I told you before this is the presentation all of the

information are there so I'd like to be sure that you can have this and you can use this later okay uh I think I don't have I have time in two questions probably not okay I have two minutes to question do you have any question one two yes uh no uh Amash is over there he is doing doing it yes so I don't have any comments about uh in blockchain communication uh in your

ecosystem how what inter blockchain communication like with bridge between networks yes this is the point uh that the that I told you before that that's three networks that we have and they have separated rules in that process in order to don't have any manipulation and uh it's like really really hard to have some attack because we don't have it's not a node it's a decentralized network and it's not a one decentralized network it's three so it's really secure to to this part okay than you okay and VMA has another um I was just wondering in the

to understand better the process of creating the NFP if you go back to your slide like where you have these diagram yes still hard to understand like the whole process yes this H I have own better that probably G can help you more because we have out the networks this is good yes so basically when we created the um right yes we have tooy to an address what would be the connection between

interesting yes like this is the SE that this was the last smart content that we did this is on Fuji and we did that pointing to the cont that is in the order blockchain so the parameter in that moment is the address of the content that we receive the message was our second cont so you remember that I told you that we started at the end so we started in the destination blockchain we create the nft then we create the smart content prepared to receive the message and the me nft they receive it then with this

done we came into the and deploy the cersi blockchain but in the cersi blockchain we already defined that it should communicate with the destination blockchain because we pass the address of that okay nice nice question this is really hard to to understand so I think my time is over so thank you so much if you need something I'm around thank you [Applause]