chainlink developerRunning a local Chainlink Node Chainlink Hackathon Workshop

Crypto Rates - abokiFX Crypto Rates = BTCUSD = 27888.1323 BTCNGN = 20776658.5451 ETHUSD = 1855.3826 ETHNGN = 1382260.0437 LTCUSD = 90.2718 LTCNGN = 67252.5169 XRPUSD = 0.5121 XRPNGN = 381.5248 BCHUSD = 124.1312 BCHNGN = Ripple Vs SEC: Attorney Explains How Judge Torres Might Apr 14, · Therefore, the overwhelming majority of evidence suggested that XRP purchasers did not rely on the efforts of Ripple. In conclusion, no reasonable juror could view the paucity of evidence presented by the SEC and come to the conclusion that the SEC met its burden of proving prong #3 of the Howey test. chainlink developer Running a local Chainlink Node Chainlink Hackathon Workshop
chainlink developer Bagaimana cara membeli PAX Gold Sri Lanka - Running a local Chainlink Node Chainlink Hackathon Workshop
hello hello whats going on everybody welcome to another workshop its friday we are at the end of week one of the chain of the hackathon uh really exciting been seeing a lot of chatter in the discord a lot of people building really cool stuff so were just gonna keep the party going and were gonna keep learning gonna keep building um and learning how to build these these superior digital agreements and take us to the next level and really bring us usher in that fourth industrial revolution usher in this new age uh you know headlined by us the pioneers of the development uh space the pioneers of this new revolution so im really excited to see everyone chatting so much um see all the activity thats going on and im really excited to see it continue as the hackathon progresses so like i said were gonna get not like i said uh per usual were gonna give it a couple minutes as people kind of uh stroll in hello hello friday is just the beginning absolutely a hundred percent um so today were working on something very cool obviously were running a local development chain link node i actually have to edit the title to be a local development chain link node were going to be doing a lot of cool stuff the reason that we want to run a local development chain link node is obviously because we can test stuff and we can do stuff so were going to give it a couple minutes as people stroll in hello hello good morning good morning how are we doing here joshua hello mr nguyen hello chloe hello hello hello good morning it is friday morning and i am excited im jazzed up im ready to go ready to build me a chain link node real quick right do some fun stuff ready to do some cool stuff yeah so welcome welcome so it is 8 33 i think its about time we start uh jumping in huh i think so would be nice if someone linked previous talks workshops on the hackathon website so theyre easy to find and accessible uh great suggestion um great suggestion actually well see if we can do that so today were going to be running a local development node now this is going to be a little bit different than if we were going to run like a production node right if you want to run a production node or you want to run a know thats really going to take jobs and have 100 up time you can 100 check out the docs on how to do that theres a dock session section running a chain link node thats great that well go into it more but today were going to be looking at building a local development chain link node okay now why do we want to build a local development chain link node and the answer is that it is great for testing and for spinning up um spinning up jobs and spinning up workflows and doing things a lot quicker right again were engineers we want to be able to build stuff move we want to be able to do stuff quickly right so and thats going to you know help us do our trial and error a lot faster so excuse me if we spin up a development node we are able to um you know do all this testing much quicker so again this isnt going to be going over docker we are not going to be doing docker um docker is awesome like i said for doing production stuff uh but it can be a little bit finicky right with the um it has specific i forget what theyre called like docker endpoints or something um basically if you dont tell it exactly how to access the real world it will be confused and not know um how to do any of that right for example like localhost wont work on docker unless you tell it specifically hey this is localhost so uh were gonna be able to spin up things a little bit faster uh running it like the way were gonna run it so without further ado let me share my screen um hopefully im doing this right oh im not doing this right sorry guys give me one second here there we go sorry about that so we are on the chain link github right so this is the chain of github ill zoom in a little bit just in case and we have some instructions here so this is the chain that github hello look how beautiful it is yes yes yes very beautiful um and we are going to scroll down to the install section right this is the section right here that were going to be going over right now and were going to be using this to build our local development chain link note again you want to do one thats like docker ready um and with a little bit more of the bells and whistles you go to this running at chain link node section which will kind of which will go through everything that you didnt know you know all the different versions you know this will get you set up for success in every way so again the reason that were doing a local development node is because we want to um we want to iterate kind of quickly on our testing im going to iterate very quickly so lets jump into it uh and these are really these are the instructions right here so the first thing we need to do is we need to install go so our excuse me so i already have go installed and even just popped up right there for me and actually lets keep it kind of small oh version have at least uh 1.14 which the version that we need for go uh you can follow the instructions here on how to install go this is the steps for linux for mac here um open the package file yeah you just click this big button hopefully that will be hopefully that will do it for you or windows or whatever youre working on right so we want to install go important thing to note is we do need um the path as well once we install it we need to set the path so if you if you install go and you do go version you get that gray we also need to set the path so oops um so you need to run this export path equals this uh for for our mac os or you can put this in like your bash profile or your bash rc this is setting the environment variable a path so that includes this go path okay so this is going to be really important for um when youre running your your code and for it to be like okay where is where is go i dont know where do i find go so install it export the path uh and thats really it and then again you can tell that youve done that part right if you do go version and it uh it works so thats probably it for the new stuff for you oh thats actually not probably it so the next thing is you do need node.js and yarn so again node.js um theres all these different ways to do it um like you can whatever your whatever youre on again im on a mac os um node.js has actually really good docs for installing stuff here are whatever version youre working on you can come here and find um what version of node.js and again node dash dash excuse me no dash v thatll tell you what version of node youre on youre also going to want mvm so um the reason that youre going to want mvm is because sometimes you want to have a very specific version of node for running this stuff so again youre going to want to install nvm there are a couple different ways to install mvm depending on what youre using so node mbm and then mpm v so you know what version of nvm you have so you absolutely want node you absolutely want nvm and then you also want yarn these are all i kind of think i i bucket all these kind of into one because when you install node you get mpm but you dont get yarn so you do have to do like install yarn theres just kind of a lot of setup theres a lot of setup that you guys can do install yarn yarn is actually really easy to install npm install global yarn right thats the easiest way to do it because when you install node you automatically get mpm so i know im kind of saying a lot of stuff again guys please feel free to make this interactive ask questions in the chat if youre totally blown away theres just kind of a lot of setup for getting this done because chain link uses a lot of tools um so we installed go great uh we installed node.js great we installed yarn great we have nvm great and again if youre like i dont know if i have them go version great got it yarn fv great got it no dead feet great got it nvm great i have all four awesome the only thing thats a little bit trickier to test is your path you can do like a print evm im not going to do it because i have a whole bunch of stuff like a print env and thatll tell you where all your variables are all your environment variables and if you see path and it has this this um the go path in it um you will be uh youll be good to go right so it and the go path is gonna be like this right so its gonna be users patrick slash go so we can even um less users metric oops so i have users patrick go this is where i have installed go and i have my my path variable includes users patrick go so thats how youre going to test that there its there so when you do print env you see the path variable itll have go in it all right cool we talked about these uh we talked about this great so the next one that we need to install is postgres so theres a whole bunch of different ways actually to install postgres again im on a mac i dont know what the popularity there is but theres a whole bunch of different ways to um uh theres a whole bunch of different ways to do this uh so we can go right to the docs right to the link here um and theres a whole bunch of like useful tips for installing um posh grass you can also just do you know install postgres you know whatever im getting on mac os and we come right to a package that says hey heres how you do it um you can do with homebrew this is actually what i did postgres brew install cask postgres so theres actually going to be two uh two different things that youre going to want to do so youre going to want to install pokestress and youre probably also going to want to install the postgres cli so thats going to be this psql-v oops psql help and this ones pretty easy this is the postgres client so install psql i actually had a page up a psql is postgresql client this is how youre going to interact with your postgres databases and then postgres itself post press okay just help okay postgres oh i mean oh sorry im looking for version f version postgres version um those are going to be the two pieces that you need so you need this postgres command and again you can test it by doing postgres stretch version and then you need a client which is going to be psql version so this is the postgres database and this is the postgres client so this is for interacting with the database and this is this ones for interacting with the database and this one is for you know setting up the database and running the database so um a couple questions here are you setting up the node on your personal computer here would it be better to install it on a dedicated one like a raspberry pi um good question yes so if youre gonna run a real node and then actually im hoping that this is big enough ill zoom in just a hair sorry i realized thats a little bit small enough for us um yeah so im running this locally and the reason im running this locally is so that when im building my depth my applications my depths i can actually test quickly and spin up stuff um on my node and use my node as kind of this proxy for for doing stuff so i am testing locally uh this is kind of for my personal computer so that when im building my applications i have something to test with really quickly and just an edit without having to jump through all the hoops of having a production ready application thats a good question i think cloud is most um okay cloud is good yep but um having your your own infrastructure is actually better lets go out to the rescue yeah this is this is just for local development however so that you can iterate quickly exactly you would not want to use this um or a pi for operating a node that others are using correct yeah um its kind of unrelated to this uh chat but yeah you probably some people have said yeah i can do it on pie but um you know if that pie goes down or that pie comes offline and your oracle is no longer servicing you are quickly going to fall into the dumpster fire that is your reputation so i would highly recommend not uh running it on a pi uh why do we need postgres because thats what the chainlink software uses it uses uh you need a database to store your your key store um to store kind of all your your offline um because at the end of the day chain link is a is just an uh is an off chain service that interacts with you know the layer one she thinks the layer two solution so the chain link node needs a database to keep track of stuff right to keep track of your keys keep track of job runs whos interacting with your node um you need a lot of this stuff a few questions so um so we need postgres i like to have this little this little application this little postgres application again im running on a mac so this is kind of what i use usually to run my postgres but um and its its a little bit tricky so you kind of go over all of them all the different ways to install postgres but uh install postgres and again you can you can make sure that youve done it right psql dash version postgres if you have those youre doing it right so again i use im using a mac so i did a whole bunch of this brew stuff yeah i did a whole bunch of this brew stuff again this is just for the client and then i also did like postgres mac os i think this is what i do yeah i use this postgres app because it kind of just keeps track of stuff keeps track of a lot of stuff for me um which is really nice but theres a whole bunch of different ways to install postgres so um so once you get it up you will be good to go cool so postgres um oh and this side you you should configure postgres to use ssl collect um connection so this is good um for um for doing a little bit more serious um i dont have mine set up like this and maybe i should even put a note in here um yeah i should probably put a note in here because i do a workaround to not have to worry about ssl because if im just testing locally i dont really care um but for full on testing you are going to want to do that just to make sure that you can actually connect to like apis and stuff so i will show you kind of the workaround that i do though so once we do that we run make install and i actually am going to run this even though i already have it installed so were going to see if this breaks everything oh oh sorry um nvm use 12.18 but we we do want to be using node read 12 0.18 and thats why we want mvm so that we can easily switch from um different node versions right we can easily switch from node uh well well were on 12.8 we can easily switch around node versions because we want to use node 12 for this so once we have all this installed then we can run make install and this is actually going to should i make this bigger is this not big enough for you guys lets make this nice and massive nice and big there we go make install and its going to do a whole lot of stuff so while its installing uh while its doing all this stuff lets look at a couple other questions what happens when postgres database goes down or corrupts is it possible to use the essential historic like ipfs in place of postgres uh no not at the moment um and you probably wont want to do that because youre going to put your keys and stuff in your database um so you kind of dont really want to or well things that can lead to what your key is so you dont really want to do that actually and for goes down or corrupt i mean this is why when running a production node you want a super highly available redundant infrastructure right this is why when a lot of times people say hey you know whats it take to run a chain link node i usually just say devops you need to be sick of devops um and again thats for doing production stuff right thats kind of a more production node operator conversation were just focusing on a local development node and the reason were focusing on this is because if we run a local development node we can start testing you know custom jobs custom apis external adapters which we built which we will go over later today um its a good question um and what happens yeah and and this is the other reason why chain link is a decentralized oracle network right because if one node goes down the network proceeds right the network goes on because there are multiple nodes that are providing data in the same way like ethereum if and if if a single ethereum node goes down nobody cares right because theres so many other nodes right theres so many other nodes that make up the system so um if our date if your database goes down or corrupts um thats thats obviously a little bit worse than if your ethereum one does um but this is why you need a really highly available system so uh yes aws has some really nice um really nice pieces i know aw all the cloud providers do have some really nice uh tools and tips and tricks to make life a little bit easier um the thing to note about aws and any cloud provider obviously is that if everyone is running on a cloud provider and that cloud provider goes down well thats our single centralized failure point so it is a little preferable to run your own eth client it is a little preferable to run your own um infrastructure but again that is outside of the scope of this call we are just talking about local nodes so great so we have it set up we have it set up now so we can see if its done oh if you get any errors regarding locked yarn package try running your uninstall before this step oops well we didnt do that but if we run chain the kelp awesome we can see all the commands here so this means that we have successfully installed the chain link um chain the command and we can see the version 10.2 this is the latest and greatest we can see all these fun commands which well get to in a bit but all right awesome so what do we do now um to start the node run chain link nodes start now this will we can we can run through this if we want um but um actually i think its i believe its going to actually hold on i think i have an env oh its not envy this is a sample emb oh its my sample ev okay so we can do chain link node start but im gonna not do that quite yet because im going to continue setting stuff up so we have that installed so if we look at you know running a chain link node someone wants to make a pr actually to this readme to make it a little more clear feel free weve actually got everything kind of set up what we need though is an environment file the environment file is going to show us everything that we need to know so yeah if somebody even wants to make a pr saying hey next thing youre going to want to make a dmv maybe even a link to here that would be a really simple pr nice way to get involved um anyways we need an environment uh environment file so this kind of just gives us the real basics of how to interact and how to work with the chain link node so um we can actually skip this part skip the root part but let me let me show you what a sample dot emv file is you can copy paste that into here and actually you can go to here cd environments maybe here is what a sample dot emv file looks like so you can copy paste this into a emv file i just have mine in an environments folder and lets lets go through what all these are and and what they need so ethiorl this is our websocket connection to the blockchain this is my my test instance um uh im going to be running this chain link node on coven um thats what im going to interact with so im going to be doing this on coven uh and uh yeah this is my this is my fun testing inferior key that ill probably pitch after this call if you want to work with external initiators you can set this to true um you probably can just leave it blank defaults to false most of you probably arent going to be working with that log level level debug this is to show you the different um when you run the node youll see the different kind of logs pull up each chain id this needs to match what your ethe url is so kovins chain id is 42. so were going to set that up like that minimum outgoing confirmations you can set this to zero two doesnt really matter uh the link contract address does matter this is the address of the link token on whatever chain that youre working with so were working on code were going to be doing this on coven so were going to do this is our link token now again if we wanted to run a local blockchain we could it it cant be ganache or hard hat or anything like that that doesnt work the the rpc calls arent the same if we were to run our own local like geth blockchain we could we could do this deploy our own link token and set this up differently if we wanted like a super full powered end to end like this is a true local test net or a local development network um but were going to be working with coven here this is a local chain link node working on the coven chain so tls port secure cookies allow origin dont worry about that but the database url we do worry about this is why that postgres stuff is so important so and this is kind of my work around to not having to do work with ssl i just add a query param called ssl mode equals disable so if we come back to here on the set the remote database url config because all these are all these are really running channels oh yeah perfect look at that dont do that um oh sorry i skipped over something so you can also set up um a local uh like a local blockchain like it doesnt even have to be like in fiera right it doesnt have to be inferior it doesnt have to be alchemy it can be whatever you want to be um and there are some other docs here on the ethereum client on the same machine um and youre going to want to kind of this is for docker for uh this is for docker dont worry about that for the local for the local development you can just use the http endpoint of your of your your geth or whatever so anyways so we do need this though this is a database connection string for postgres this is how we connect to a postgres database just kind of anywhere you can see what the layout looks like here so its going to be postgres uh your username your password server port and database this is this is what the setup looks like mines a little bit shorter because i dont have a password on my local database um so mines just localhost port patrick but if you have like a password and everything server port you know this is my server is localhost my username is um postgres username i dont have a username apparently um i dont have a username or password servers localhost port is 5432 database is patrick now lets actually even make sure we do this right so i have posters running in this little app you can get posters running however you want but this is why we need the client if you run psql and it doesnt connect to anywhere you know youve done something wrong right and i can also do psql dash you patrick i think thats right yeah so dash u tells it which database to connect to so we already have a database patrick excuse me we already have a database patrick set up but if we go into postgres we can also do like create database proven demo so again well even drop that drop database create database coven demo oh my gosh whatever um so now we have a database called covendemo and lets say clip what we can do here change this from patrick to coven demo okay ssl mode is disabled because were going to be disabling ssl were not going to deal with that stuff so its running on my local host on port 5432 you can check a lot of kind of the different configs and stuff in here theres the port that its running on again this is just for mac os i think each i think windows has something else i think linux says something else or you can run it right from command line this is just kind of the way that i like to do it um database timeout dont worry about that for now flux monitor dont worry about that for now minimum link minimum contract payment this is for your run log jobs this is for like the api calls this is the minimum payment that somebody has to make to your jobs okay so this is in way and this is going to be um what is this one two three four five seven eight nine ten thats gonna be point one length basically so this is point one like were saying the minimum is point one link and were gonna run it in dev mode so im gonna right quit there uh and i just created a new database right so i created a new database you saw me create the new database and thats the database that were gonna connect to here great once you have the database started which i do um and if you ever like wait im im its not working you can always just do psql dash u um covan demo and then you can even do the a uh h this is gonna be the um the endpoint to get to it uh roll cohen demo doesnt exist well if we did it wrong psql so you know we can even uh help psql dash that should help is adapt to you oh what does dash you do is that the right one oh thats username whoops sorry thats username port um postport username oh its d so psql excuse me dash d oven demo there we go and now were in there so yeah obviously defu is username it doesnt make sense about the um database so weve proven that we can connect to it and thats how youre going to connect to it um you can also do def h i think this works i actually forgot okay that works dash h this is saying like um the ip address of what were working on again were working on loco so if you can do this you can connect to it and this is the same command that you want to run when youre running like a full-fledged chain-link node to check to see okay is my database even alive right thats probably one of the most common things i get people asking is hey i keep getting this weird error i dont know whats going on and its like okay well can you even connect to your database no i cant okay well thats your problem so once we have all that set up we can just go and again uh im kind of bouncing around a lot sorry guys um your eth client i should have said this first sorry guys the east client the ether realm again you can get this from infera like i said you can get it from alchemy im not going to sign in but um its just you just want to make sure its the websocket so heres a sample of what it looks like you can copy paste from the docs lets do it and once you have all that again we can just look at between the commands link node local right pin the node its going to give us all the commands here the user import blah blah blah start chain link node start stuffs going to happen so this is basically the node initializing its saying hey were getting startup we want to do some stuff lets do some stuff so we have to create a new keystore password so when you create a node you create a a key you create a wallet right for the chain that youre working on so because of that you need a new key store uh password and this is going to be um used to encrypt your key so were just going to call it password uh oh i guess i cant do password sorry oh this is new they basically said you cant have crappy passwords anymore okay cool um so were gonna give it um capital oh gosh no i have to remember password 101 capital capital p no okay must be longer than 12. three uppercase characters okay so were going to do okay p a s s w o r d one two three four five six seven eight nine lowercase characters okay here we go pass is gonna be up uppercase word is gonna be lowercase one two three four five six okay paths is uppercase word is lowercase one two three four five six ask this uppercase word is lowercase one two three four five six okay enter api email were gonna do test at api password is gonna be test okay lets enter a good password test at and the password is gonna be the same actually were gonna do p a s s is uppercase word lowercase one two three four five six and cool so we have it starting and being kicked off so these are all the logs that are happening when a node is running now what we can do you go to localhost um 6688 and we can see we have the chain link node operator ui here so we can actually log in um crap i forgot p-a-s-s-w-r-d one two three four five six and we can see we have um were into the ui right were here we did it great job can you can you link the sample uv file youre showing the one on chain link docs seems different uh lets go back to the chain link box uh where is the sampling envy is it in core i can link that um you can also check the one here this is basically going to be this is i just have a couple other parameters this is really what you want um for whatever your network youre working on um i would say just use this one actually because yeah this ones actually much nicer and then just add the ethe client um and just add the eth url to whatever your eth url is so i would say i would say use this one actually for whatever network youre working on good question so we have the dashboard were in the dashboard great what do we do now so what we can do is start doing fun stuff so lets go and add a job so we can now add a job here i usually just kind of scroll down to here um this is a really simple job so this is going to be what a job looks like for a get you in 256. okay so this is a run log job so run log jobs are the jobs that are defined by this uh make a get request bit here right its the one where its one where people have to choose their oracle choose their job id um this is going to be that that type of job so it makes an http call it json parses the api call and again if youre new to the jason pars go check out the the make it api video excuse me make an api call video theres multiply um which multiply stuff turn the result into an fu and 256 and then make the transaction on chain uh now the one part here that its gonna be like wait what is this address your oracle contract so lets get that done what the channeling node is really doing is its listening to a very specific oracle contract and its waiting for requests to go to that contract so we need to tell our node to listen to a specific address on chain so how do we do that how do we get that set up well we can come here go to node operators fulfilling requests and then you can just use this for what every test nets moving forward that way you dont have to always redeploy it um we can come here and remix actually pretty much has it already all set up click the click that remix button so this will explain more in depth too on how to filter fill requests you know make sure youre youve done some of the stuff you know how to use metamask again you need the um you need your metamask set up right you need testnet eth um uh im assuming you guys know youve watched some of the other videos um so please if you havent go watch the other videos theyre also really good um when we click the the remix button we can expand the gist menu and we see we have this new oracle.sol so this is the this is the contract this is the oracle contract that our node is going to be listening to to get requests so uh if you guys want to deploy it in remix you absolutely can you can deploy it on truffle heart at bernie whatever you want to do lets just go ahead and deploy it here so we can work with it right now so were going to do injected web 3 and again if youre if youre like what is this remix thing whats going on watch some of our other videos they will go into it more in depth so we need to deploy it with um with the coven link contract we say this is the link contract here were going to deploy it confirm is that the right account i want to be on probably sure you know why not who cares so were on coven and yeah and this part is going to this part is going to be the same as if we were running mainnet right so we have our contract here great so this is going to be our oracle contract now how does our node know that its our oracle contract well were just going to set um were going to set a parameter real quick so in our configuration or excuse me it actually moved to keys so for those of you on older versions of chain link it used to be in configuration theres an address in here now its in keys account address regular this is our new this is our chain link node account this is the wallet that is associated with our node okay so were gonna copy this address here and in remix theres a function called set fulfillment permission if i scroll down well show the whole thing yeah set fulfillment permission and were gonna say this node and fulfill out the oracle requests that come to this contract okay this is obviously really important this this wallet address which is the wallet address of this oracle that we just created or of this node that we just created can fulfill the request to this oracle contract now this is something thats going to confuse some people and it we just need to remember the oracle contract that we just deployed is different than the wallet address that gets created when we spin up our node so node node wallet or node account oracle contract node wallet oracle contract great thats the difference so were going to say our node wallet can fulfill stuff that comes to this oracle contract set fulfillment permission to true minimap pops up confirm awesome great now what we can do is we can grab this and we can set this like like this so now we have an api call excuse me um now we have a job once i hit create job were gonna have a job that gets kicked off from those run logs again from those from those make and get requests from those api call jobs here and it has all these tasks right we can set parameters to these tasks if we want we can do like params no um this is where youll put like body and and stuff like maybe like header cap whatever you want to do were not gonna do that now but um this is kind of the bare bones job right its its saying these are the tasks that can do you do an http get adjacent parse multiply ethylene and then make an ethereum transaction back on chain you can mix these up you can do whatever you want you can have any type of jobs and again you can list it on the marketplace but were not going to talk about that because were just doing this for local uh local development when should i use jason parson copy this is a great question actually um so if we go to the docs this actually still confuses me sometimes uh and i i honestly i i was like ill just check the docs um if i get confused um so copy copy is a core adapter that walks the copy path specified and returns the value found on that result if returning json from an external adapter you will need to use this adapter so copy is for external adapters and json parse is for http get http post so in our dashboard here were using http get so were using jsonparse if this was an external adapter which well go over later today um this would be a copy great question really good question so lets go ahead and create this job invalid json oh no i mess it up for that comma so i have a job named get you in 256 and this is its job id on a local chain link node which is awesome which is super fun so what can i do now okay great well what you can do now is whatever you want to do we can create external adapters right and thats going to be the biggest value add of writing your own local node its creating external adapters but lets run this as if it was as if it was like a real job so what were gonna do yeah you know my terminals still running right uh if i turn this off its gonna kill it come back here i hit refresh its like oh no its gone lets start again um p-a-s-s-w-r-d-123456 when were back up and um actually to not have to do your password every time um in your env file you can set like a dot password uh were not gonna do that now but um its somewhere in here uh in your env file you can set like a dot password um so that you dont have to always do that but in any case were gonna hit refresh um and were back in because the still up oops sorry so lets go ahead and try to get some get some data right we have this deployed we dont need this anymore you deploy the oracle contract once and youre good to go you can always come back to it right you can always go back to it and actually lets even go back to it just this here its like oh no i lost it i dont have it anymore how do i how do i set new fulfillment permissions or how do i withdraw a link or how do i you know do this that the other thing so what you can do is grab this you deploy it at this address but when you when you do address you say this code this is the code that is at this address remix is going to go i believe you heres how you can interact with it and give us this stuff here so we can still set fulfillment permission on you know whoever we wanted coming true and we can withdraw link transfer ownership renounce ownership whatever we want to do so but lets go ahead and practice making an api call so were going to come right to the docs here make a get request right because this is what this is practicing this is what this is doing well hit this big remix button and in the gis we get api consumer and what youll see is uh right here in the constructor we have an oracle and we have a job id so we just deployed an oracle im going to use my r call use oracle r oracle boom new oracle boom new job id right this is going to be the um this is the oracle that we just deployed this is the job id right here it looks like we have an issue invalid checksum you got this uh dont worry about this just go to the scan etherscan pop it underneath the scan we grab the real checksum it just like changes the capitalizations and stuff so i believe that this is the same um uh the same type of job so lets go ahead and test it lets see if it is lets test it so same thing same thing as like as every other um every other deployment so were gonna switch to injected web three were going to be on our on the cover network we have our eth we have our link so its going to be just like what we normally do except for its going to be going through our node here okay so im actually going to do this wrong the first time just to show you an error that you might run into so were going to copy this so im doing something wrong here trying to spot the wrong what am i doing wrong we had the link great oh its frozen on me were going to add the link actually coven might be slow because its the test then were going to add the link to our contract here all right great it worked were going to do request volume data confirm so we just kicked off a call to our oracle so if we did this right we should see a run created just now on oracle which we do which is great but something wrong is going to happen something very wrong is going to happen and uh im going to see if im actually going to ask does anybody know what we missed here if anybodys run a node before does anyone know what we missed here oh well it looks like um oh well looks like i got raid limited so so that was that was the first issue so we actually cant even use that um this api call here so sorry lets uh lets use a different api lets use alpha bandage i got relimited on my local machine ive been using an api too much apologies lets do a different one exchange rates lets use this so were gonna use this one and were gonna look for uh were gonna look for exchange rate so we are gonna grab this were gonna grab this api so were gonna were gonna fix this on the fly guys so were gonna use this new api okay um its actually gonna be a nice fun little test we do have to add a path however because theres spaces and stuff in here and the paths that we need were actually going to do it a little bit different were going to go to adapters to core adapters copy right because we want to use adjacent parse we use json parts here were going to do it like this because there are a bunch of spaces boom can you format thank you and we see the path here is going to be real-time currency exchange rate thats zeros real-time currency exchange rate then were gonna get um exchange rate add the path were gonna do the multiply we need to multiply this number because look at that number and boom so this is what were gonna go for instead so that because im im very limited so lets redeploy so i did i did do something wrong but i did something um wrong that i wasnt uh anticipating to do wrong so sorry about that guys um but now we have a new one lets lets uh lets refund it with link well make that api call again and well see what is happen whats wrong on our side so if we do this call again again we go to our node we should see another run coming soon here it is heres the job that just came in and we did something wrong here so i see a couple i see a couple of guesses off f uh ftx no not quite the value could be found for the key well im making bad api calls oh well this is also wrong this is a two um so im doing a couple things wrong so thats not what i intended to do wrong so lets try those again so i made a i made a string a string array of size four when theres only two things in here um so i i dont think i like that one more time third time the charm here we go and is there a uh if we go over is that okay its okay if we go a couple minutes over okay cool so send some link lets try this third times a charm confirm and yeah you guys can actually see here why its a little bit nicer to variabilize um your requests so if we had this like string memory url we wouldnt have to redeploy every time we just swap out the url for something else remember url maybe even like a string path or something like your string memory path um that would make these a lot easier so parameterized stuff guys it makes your life easier so lets see if it worked this time okay great here is the issue that i wanted to actually show you guys so everything worked right we added a um an api call we parsed it down to get just this value we multiplied the value we changed this value from what it is to a fu 256 version of it so a version that theorem can understand but its stuck oh no why is it stuck whats going on now if you google this pending out sending outgoing confirmations you google this pending outgoing confirmations youll get a a great stack overflow answer that kind of goes over some of the different things that we could do and what youll see um excuse me if you remember how i said we create our own node address and our node address is actually going to make a transaction back on chain okay so if you know that that this node actually has to make a transaction back to the chain what is it missing what does this node not have what does this wallet not have any of if it needs to make a transaction it doesnt have any ethereum it doesnt have any uh doesnt have any gas to make that transaction so we actually have to send this to call for eth yes exactly yes it doesnt have any um any so we need to have this this uh this funded this address here funded at all times uh with eth in order to make these transactions so if were going to be running our local node we need to have it have some eth to be successful here so now that ive just funded it if we go back to runs in a minute or two well see it actually go through unless i didnt give it enough eath aha so its back to being in progress and now its completed so that is how we do it we can even do another quick uh end to end well see that if we request moving forward assuming 0.18 is enough now we should just see it go right through without us having to do anything and again yeah over here in our in our job well see you know we actually get the response from our node which is great and then well just wait for this to uh to come through and once it comes through depending on the speed of the network remember because we are working on a test net sometimes theyre a little bit more finicky and yeah i know were going over a lot of stuff here theres a lot of stuff to running a node yep the web3 account is spun up great yep you got it the web3 account is spun up when you generated the node and secured by a password so when it said enter this keystore password that was actually saying hey were going to spin you up a wallet can you uh can you give us a password so we can encrypt it so thats spot on spot on but now we see that it actually went through right away without us having to do anything and now we can kind of be and we we can even see that it changed here and now we can be hands off with the node right we just need to look at the eath bounce from time to time make sure it has enough stuff in it but now we have some green check marks yay and i know we went over a lot of stuff today theres a lot of stuff theres a lot of stuff to this this running a node um especially locally but once you get it set up like this you can really just kind of cruise control cruise through um and not have any issues um and just kind of all right run your node do your tests and and have a blast so again this can be really helpful for external adapters and you know if you want to test locally if you want to test your your own node before going maintenance you absolutely should by the way um and you should probably even have some people using your node but this is more for testing your dapps right if youre going to want to you know get some custom data maybe you want to test a crazy external adapter and you want to test it yourself um heres a way to do this so um open two questions now and i know we are were probably im happy to go a little bit over here if there are some questions so so this means that chain link nodes can capture and manipulate sensitive data between the contract and the api i cant see how chainley can guarantee the quality of the data um great question actually so this is why um its just you need a decentralized network when working with this stuff so this is a single node right in the same sense if ethereum was a a single node then yes that single ethereum node could break the computation change the state do whatever it wants to do right um so chain link is the exact same way if you have a single chain link node yeah it can manipulate and be malicious so this is why you need a network of chain link nodes so making a single api call through through one of these is no good you wanna youre gonna wanna get a group a network of these nodes uh to be delivering this data right so thats a really good point and thats actually really important for working with the data on chain so so thats the answer there it needs to you need to be in a network of chain-link nodes and obviously the economic security there plays in if a node is getting paid to make jobs and theres one node on a network that just keeps not returning correct data or keeps returning to bad data you know that history is tracked on chain right thats permanent every single response a node has ever made is always going to live on chain so they have a permanent record of your behavior on the network so this is obviously really important great question you need to manually contact people to use your node right um out of the scope of this again this is just for just for local development um you can you can do stuff on marketplace you can yeah you can manually reach out to people you can work with projects but um lets keep the questions focused on kind of running a local node um but yeah the answer the answer would be the answer could be yes but yeah you could also list it on a marketplace and just kind of have people reach out to you you dont always have to manually reach out to people or you can list your job and just people will use it if uh if they want to any other questions i dont know if i if i missed any other questions i think i did miss this one so its like when when oracle gets the data it writes to the chain contract using the associated wallet hence the reason for fulfillment spot on yes so you need to set fulfillment permission because um exactly that the the that wallet is the wallet of the node is going to be the wall thats making the transaction back and so we need to say okay yes youre allowed to do this otherwise that oracle contract just blocks everybody so spot on uh great question what other questions are there well give it uh give maybe 30 seconds i know we went over a lot of stuff here um feel free to watch this video back i know we kind of bounced around um the hardest part i think is really just getting like um setting up like post grass and go and everything up correctly that first round but then once you have it set up then you can just kind of do that that chain link local and uh and be good to go any other questions here let me move the questions up so im not looking at the bottom of the screen so im actually like looking at the camera yeah thank you appreciate that so i know that there are um theres a lot of stuff here right um theres a lot of really um this is a its a great way to kind of test and run any customized data test with your own infrastructure whatever you want to do you absolutely dont have to right you can reach out to node operators you can say hey i built this external adapter hey im looking for this data you dont have to be the one running around the infrastructure you absolutely do not and if thats not even your forte you probably shouldnt right if you want to just focus on dap development absolutely just focus on dap development and have a you know another group of node operators run your data and thats actually really ideal right because you you really dont want to be sending poor data bad data or whatever to your um to your blockchain so this is more again for doing local development uh for running a ch um running a chain link node for yourself to kind of test tinker do whatever you want to do so with that thank you everybody so much for joining uh we have an external adapters um uh workshop later today with myself we also have a couple other workshops today uh we have oh we have an awesome panel uh at noon est with uh unesco or unesco uh hopefully im saying that that correctly uh on social impact so you definitely dont want to miss that definitely check that out thats going to be a blast but um then after that at the end of the day we are doing an external adapters workshop this shows how you uh this will show how you to unlock that customization that unlimited customization of your smart contracts do all these these interesting things can you show us bridge in next workshop yep were going to show you the bridge in the next workshop uh youre talking about the external adapter bridge right youre talking about im assuming youre talking about the external adapter bridge youre talking about the bridge tab in the ui if thats what youre talking about yes that is covered in the external adapters workshop later today uh which im super excited to to give and see you guys then thanks everybody so much for joining you Chainlink is a decentralized oracle network that enables smart contracts to securely access off-chain data feeds, web APIs, and traditional bank payments. Learn more about Chainlink Website Twitter Telegram If you’re a developer, visit the developer documentation or join the technical discussion on Discord ChainlinkDeveloperWorkshops,