New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

ETHWarsaw 2023: Michał Dobaczewski, Chronicle - Introduction to Ethereum Development with Go

ETH WarsawMon, Oct 7, 2024, 12:00 AM

Introduction to Ethereum Development with Go - A workshop by Michał Dobaczewski from Chronicle focusing on Ethereum development principles using the Go programming language. Follow us for more updates: https://twitter.com/ETHWarsaw

Transcript

okay so hey guys uh so my name is m mvi and I'm a software developer in chronic cabs and chronic cabs is a company which provides Oracle Services uh for right now ethereum based blockchains and later we be also providing uh Oracle services to other blockchains and chronical is a former core unit of maker Dow because we formerly we were providing Oracle services for maker Dow protocol and uh this year we decided that we would like to create a company and provide our services to others um uh yeah and I'm working on kolabs as a backend developer and I'm working on the software that that's responsible for updating uh our smart contracts and that software is created mainly in golang uh and in this Workshop I would like you to show you how you can interact with ethereum smart contracts using go yeah um yeah so today in this Workshop we try to create simple go program that would check balances of some tokens would approve some to approve some tokens so you're able to you know swap them or do other operation with them and finally we try to perform a simple swap on un Swap and we do everything using uh go application and to do it we will use a library go called go eth which was uh which is used by chronic cabs and it was also created by chronic cabs mostly uh and yeah data library is currently used in our software uh that is used for you know our oracles and this software and this Library currently securing over five billion USD of USD mostly in maker da protocol so this makes this this this this Library quite reliable and uh and kind of trusted Tool uh so makers have this tradition of contributing to open source project or providing tools for uh ethereum community so previously maker created something called the apps that was something like um something similar to uh trle or open zeeline so the apps was like set set of tools for developing smart contracts for for for for for ethereum and right now a lot of people like who used to work for K they created under tool called Forge which also is becoming more and more popular and we had chronical laabs would like to continue this this tradition of you know providing uh tools uh for ethereum Comm ethereum community and that's why we decided to create uh to make this Library open source and uh make it available for available for everyone um yeah so uh to start you will need uh metamask uh browser extension to handle your wallets also you need to create an account uh on gly test Network and we need some test ethernet on gly um test Network and I hope that you already uh have it right okay so we can go to next uh step uh so maybe we can skip this for now the second thing you have to do is to install uh go compiler and basically we have to set up uh our development environment uh so first question do you have already go compiler installed on your computers okay so you can go to this link uh this is reposit my repository with code that we try to create during this workshop and also there is instruction how to install uh go on different uh operating systems yeah so here's the instruction for Linux uh so it's very simple uh uh yeah of course right uh do you all have it already uh you need you need some help uh yeah uh do you have get installed already okay so yeah so try to CL this repository and and yeah this be very useful later cool uh so it's already already so do you have already installed uh go everyone cool awesome uh so we can go to the next step so I said before uh today we try to create like a this very simple application that we perform simple swap on Unis swap on G test Network and um yeah uh and for this we use that Library I mentioned before uh so first we can start with creating a new project so uh open your favorite uh developing environment programming environment and we can start with the simple snippet uh but also before we start coding actually my I be also curious why actually we uh because I mentioned before that we're using some library for uh interacting blockchain and you might be curious why actually we need a library because uh every single ethereum node actually provides Json RPC API and you might think that okay instead of using Library I might just use uh this API and you know just called eum node directly right because eum node provides a methods for basically everything you have method for doing a calls you have methods for uh making a transactions and so on but the thing is uh that to make a call on ethereum using this API you have to provide uh call date not here like we need to provide a call data uh which is encoded using um this solidity format so you probably have seen it already like bunch of I can show you an example on E scan let's open some random transaction yeah so this is basically a call data so bunch of weird numbers and cod it in so weird way and and doing this manually and preparing this call data could be very challenging so to encode this data you probably need some Library also creating a s like signing transaction uh also it's kind of complicated because uh to sign a transaction you have to encode it in very specific format called rlp uh in very specific way then you have to generate a hash from this rlp and coded transaction you have to sign it so it's also quite complicated and probably without a library you wouldn't be able to do it manually so that's why actually we need some library to work with this ethereum Json RPC uh so I said before we'll use that go eth Library uh which you can find here and this Library basically provides you everything to work with Jon RPC so it provides a encoder it provides uh it could sign transactions uh it uh uh have also built in parcel for method so we can could generate signatures you could you could very easily uh uh it's another example encode and decode data and for yeah and for this Workshop we try to use it and I will show you how you can use this in your project okay so let's start with this simple uh goong snippet do you already have it right uh is it work like is go go go environment works for works for R could you compile this very simple program okay cool um so in this repository I showed you before um you have six apps y uh the latest would work but you need at least 118 so y 18 is the minimum version which is supported by tools we are using um yeah okay so first up we try to write we'll be fetching ethereum balance of some random ethereum account uh so this is very simple very straightforward but it will show you how to connect to a PC node uh and how to interact with it so first thing we have to do we have to create a transport so transport basically describes how we would like to connect to our RPC node and uh ethereum supports three types of transports first one is HTTP transport uh that as name suggest use HTTP second one is websocket which also allows to in uh fetch data in real time which might be useful for some applications and the last one is IPC which use a unique socket uh usually it's not very useful it might be useful when you when you have uh hosting uh ethereum node on the same machine as your application uh most people are not doing it so uh that's why it's not very useful uh in this example we try to we use this publicum Noe uh which should work fine for our [Music] app okay okay next step uh is actually create a RPC client and RPC client need to knows which transport it'll be using uh to communicating VPC noes so here we are using the transport Pro previously created which is that HTTP transport and finally this is a simple example how we can use it in our app so there is a client there is a method uh get balance which actually RS ethereum balance of uh some ethereum account address of that account in our case is just my account uh I've created earlier and of course the block block number because uh uh in ethereum we could fetch a data from every single block so we could also uh see what was the ethereum balance of that account like two weeks ago or year ago and so on uh why specifying just the block number and finally we just PR printing that balance and yeah so this is the m M of I have on that account it doesn't mean that I have 56 I don't know what the number is it uh because actually this is not a number of uh it's not presented in ethereum but it's presented as uh in ways and way is like the smallest unit that itum supports so actually it's around five ether on this account and we we can verify this on ether scan yeah and as you can see this exactly the same number as we get got here right or only the UN only the unity is different okay uh do you need some time to actually write this code uh do you want to run it on your on your on your laptops H how to run it okay uh sure uh so if you have uh already go installed you can just write go run and path to the script so in the my case it be step one main goal if it doesn't work for you you may also uh you might also need to install dependencies and to install dependencies you have to type go mode vendor oh did it work okay so we wait a second for you okay so this is basically the simplest thing we could do with this library and for fetchum balance we actually don't even need uh any specialized library because this RPC call is very simple uh get get balance so we can just invoke that Json methods directly without using any methods like libraries it's because yeah it it's rather simple uh but but for the next example we'll try to do something similar but this time we try to fetch a token balance so not the etherum balance but we try to check how many uh V ether we have on this particular address and do you know what is what what is w ether you familiar with this all of you okay so you know that basically it's a like erc20 wrapper for ethereum uh but in this case like fetching a balance of this token be little more complicated because we have to do actual call to a small contract so for example we can use once again eer scan yeah so here on nther scan we have implementation of R Eon G network and this contract provides few methods and one of the one of those methods is balance off which uh return the amount of w eer for particular account of course uh so let's say it let's check it and yeah in this part in my account actually don't have any V either so it zero uh but doing this call is little more complicated because now we have to make actual call for contract and to make a call call for contract we have to create a Ab a i encoded data so we have to prepare this call data uh which is little more complicated and yeah so uh can you open this step two code you have it already opened okay cool um okay so I will show you how it ex how it looks oh this one yeah so I modified this program a little so actually print uh how this uh call data looks like so to fetch um you know uh to to make a call you have to prepare this call data and this call data contains a method selector oops which is uh hash of function name in our case is balance off and we have to provide a data for for for that method in our case is an address for uh this address of my of my wallet uh and once again to do it we'll have to provide for the library a signature of of the method you would like to use and we have this method uh called must par method pric must is like a common convention in goang which means that a method must have succeed otherwise you panic because there is another version of this method called just parse method which will which will return an error but if you are sure that this method will always succeed we can use that M part method uh which is just R uh one one argument and what this method does does uh it takes a signature of the function in solidity contract and what's very cool about this particular library is that we can actually just copy paste the actual solidity code so if you would like to um call some method from the contract we can just basically find this method in the contract like here uh where is it balance off uh okay it's implemented as a map anyway so but yeah basically we can just we can basically just copy a code from solidity contract this method we pass it and Y okay there there's another way to do this right if you were to take the ABI and the bin of the solidity contract that you're calling and then build the types as well uh like using Json with Json ABI I think there's a way to like build like a go file with all the types so to speak with so if you take the Json API and the uh Bin after you compile the uh contract that you're calling as well too so yeah so go actually provides a tool that could generate this uh go file with all of the methods but to be honest I've never seen anyone using it because it's not very convenient to use uh um and actually in theory you could use go etherum uh to do all of this what I'm showing you but I think is that go like the tools provided by go eum are kind of complicated to use um for example in my example you can just you know copy paste a function signature it will pass it we can generate signature you'll be able to call this function on on on contract but uh go eum doesn't provide anything like that we have to basically create bunch code just to tell go etherum how to create this signature and how to pass it uh so yeah that's why not many people actually using go room for doing this kind of stuff and more people using ejs which is you know JavaScript library which is doing very similar and when I was when we are creating this Library uh we took a lot of inspiration from ejs so uh we to make a library that be as simple to use as ejs but in goong uh uh and yeah um so I just believe that it's kind of bit simpler way uh to interact with with uh solidity contracts than you know using this big go generated file by go eum um yeah yeah of course um so what what in case if uh the contract code is not verified so we we don't we cannot see it in the address scan let's say uh so it's a tricky question if a code is not verified uh you need to know what's uh what's it source code it's solidity source code or at least you need uh Json API like every time a contract is compiled in solidity solidity compiler could generate something like a big Json file V of the functions and this Library also support this Json file so we can use it to generate signatures for every every single method function event and so on but if the developer of that contract doesn't provide a source code and it doesn't provide uh he doesn't provide Json Json AP then you're out of luck basically it's it's impossible to to to to interact with the contract I may just you know try to decompile contract you might try to look at the transaction that were made by others and and you might maybe try to figure out but it's kind of you know hcky methods and yeah uh I think nobody is doing that maybe except some hackers um yeah uh yeah so as I said uh to make a call we have to first parts of function signature um and then it becomes a little more complicated because firstly to make a call after we have this signature passed we have to encode arguments um so we have to provide this arguments we have in the signature in that case it's only an address uh so we are providing an address uh in right it's I think quite obvious uh then it will generate that that call data I showed you before and having that we could create a call so call is a very simple structure uh which takes few arguments like PR address which is the address uh from which the call be uh executed to address usually it's a contract address gas limit of course is as you know a gas limit so how much of gas we could use in that call uh if you're doing a call but not a transaction we could ignore this parameter gas price it's also only relevant for making transaction not calls value uh this is also only useful when you want when we are making transaction because value describes uh how much of ether you would like to send some to some contract input uh which is actual call data and what's interesting about uh calls in ethereum is that the same call structure is used for uh making a calls to eum contracts creating a contract and also sending ethereum so for those three operation we using exactly the same structure so for example to send send an etherum to someone we have to set a value you know to to to some amount of e we would like to send we have to set of course to address which be an address of contract or under account and input should be empty and this kind of call we send a this kind yeah call we try to send a etherum to another address uh if we set two uh the empty value and we set an input a contract code then this code we try to create a contract address and finally if we set if we set two to some address and we set some data into input uh field then we try we this call Will invoke a method on a smart contract so basically same structure is used for those three operations [Music] M uh two uh from address uh which uh yeah okay so there is one more important thing about making a calls to eum because you you could make a call and you make send a transaction so if you're making a call we are just invoking some code on eum blockchain and basically that's all we are not modifying a tile of uh state of the of the blockchain itself and what's very interesting is that you can set a from address to any address you want so we can for example set a from address to a wallet of your colleague and see what uh you know what the blockchain behave if your colleague tries to invoke some function on some random contract uh if you set it to empty you can also set it to empty value uh it will it will work as well uh yeah uh and then we are losing also the same structure for making a transactions so as you know transaction you should be have to be mined on the blockchain and actually it modifies blockchain State and in that case uh from address have to be your address because obviously you can you know make a transaction for someone else uh you have to specify gas limit so because this is basically requirement of go eum that every transaction have need this field to be set gas price of course and for this new Dynamic fee transaction we have to also specify prority fee priority fee and fee per gas um yeah but in our this uh in but in this example we don't want to make a transaction because we only want to read data from a blockchain uh so we could make just a simple call so yeah to make the simple call and to actually get a balance of R token we have to provide as said before address uh of the rapity room uh contract address and that generated call data and this call will return an API encoded response from a contract so we can actually verify that by debugging uh this code and here in response we have bunch of data so they're all zeros because I don't have any r ater on that account but and finally we could use that parse method signature uh to decode that response so it's also very simple using decode values method we providing as a first argument uh that uh call that return return data and then we have to provide pointers uh to variables to which you would like to decode data so here that method return returns one uh Insight integer which is which have 256 by uh bits and to hold this type of value we will need uh uh um bigin and bigint is uh goang implementation of big numbers uh because obviously we we wouldn't be able to start you know a number which have 256 bits in let's say integer in 64 um and yeah so it decode that value and we stor in that b balance uh variable so we can go next step it's already decoded and because I have no balance on that account there is nothing uh and there is response from a contract so this is how you make uh how you can make a call on ethereum um so actually I think that we can skip the uh uh third program we can go directly to the fourth uh okay so now I I will show you how you can make actual transactions and uh to a blockchain so in the fourth example we'll try to create um an app that would swap some tokens on un swap um and to do it uh we'll need some more we need to invoke some more we need more signature for more function in that e token uh we'll need uh of course a okay so uh if you would like to swap or use our tokens in other contracts on etherium we have first uh approve that contract in the that particular token do you know what I mean uh you familiar with that concept I guess you you are right so every time you're going to Unis swap uh it always ask you first to approve some tokens and we have to do exactly the same in this application uh uh to in order to swap our tokens uh so the beginning of the code is exactly the same as before so we creating new uh client but this time we have to add more param parameters to it uh to make actually transaction first we need to create uh or load uh our wallet our private key that be used to making transactions because obviously without private key wouldn't be able to make a transaction and there is few ways to do it uh like for example we can use uh do method which is called U wallet new key from B and if you have uh a wallet on metamask you actually use uh generate that uh private key uh that could be used uh uh with this function uh but how to do uh there was and somewh an option to actually export it here yeah so if you go to yeah so there is an option to show uh that R to show your private key uh obviously I wouldn't I wouldn't do it because I'm using this uh wallet for some other purposes uh but if you click on this button maybe actually I could change to uh to to other maybe this one I'm not using this uh uh this wallet so we can use it this an examp as an example yeah so this yeah no I can't so maybe I just create new one show Private key oh give me a second yeah and this this is how our this is how our private key looks like we can copy it provide it here oh copy doesn't work uh right TOS I got this one okay finally um yeah and we can actually verify uh if we are getting the same address yeah so we got uh after uh passsing this private key we got this address and this address should be the same as an address in our wallet and it looks like it is the same so 4 cd and yeah 4 cd it's exactly the same address uh there is actually few ways uh to connect a private key uh uh with this Library so the first method is uh as I showed you is to use a private key the second method is to use Json key uh like this one and Json keys can be can be generated using go etherum client and the last way is to use neonic so you probably uh aware how the neonic looks like uh yeah so uh neonic is basically this set of uh wordss that are used to generate your your private key so this also an option uh for for for for for uh importing your private key or wallet to your code okay but uh let's go with this example here I'm using my private key start here this is Jon key uh and this is a key for uh for for for for that same wallet I've been using previously and here we have to modify our client we have to add some more information to it so firstly we have to provide uh a key that we used to make a transactions uh so our client will know which key have to be used to sign transaction and we automatically set a from address for our transaction and so on uh default address so this is used uh in a case if you use multiple keys because uh we could we could provide multiple Keys you know to different keys for different scenarios uh so if you would like you can uh set this value with default address and so in that case if you don't set a from address in a transaction or call it will automatically set it with chain ID so it's very important uh to set chain ID uh because like as you probably know different uh blockchains on E room have different chain ID like you know Gary have different ID um eum have different ID like mayet have different ID seoa have different ID and this is very important because it it's actually used for signing transaction this ID is included in a signature kind of um and this is added because without this someone could get a copy our signed transaction from one blockchain and execute it on another blockchain So to avoid this every single blockchain have different uh chain ID and finally this s look like nice future of this Library uh we have something called transaction modifier and transaction modifier is a feature that allows you know basically as the name suggest modified transaction uh to add some uh more features to it so first modifier is knows provider which automatically set knows to the next number because probably also you know every single transaction on eum uh have this unique uh no number let uh I get this this number and every every time you are sending a new transaction to blockchain this number have to be increased by one uh and to avoid doing this manually over and over time there is this text transaction modifier which will set this non by for us then is a gas limit estimator which is also important because every transaction have to set needs every transaction requires a gas limit to be set and also like doing this manually over and over time can be cumbersome so that's why uh this Library could do it for us and finally there is a gas estimator which trying to find like the best possible values uh for gas um you know so once again we don't have to do it manually uh there are two gas estimators there is one which use Dynamic fees introduced in this AIP 1559 and there is a second one that use uh uh Legacy value which is only you know uh that one that Legacy system that was used uh uh recently so I skip some code because we are kind of running out of time mhm yeah uh for the private did you um put it in directly I was just wondering if you Ed an environmental uh yeah you can defitely could use environment variable uh does it work for you or yeah uh okay so I didn't hide it uh I'm just use uh I will show it okay so basically you have three ways of importing Kum Keys um in right so uh the simplest way to import the private key is to use this new key from byes method and it takes basically your private key uh like 64 bytes of private key and it can generate it you know basically a key the second method is to use uh Json Keys uh so there is a method new key from directory you are providing a path to directory with Json Keys uh optional path password uh address of the key and it will try to find a Json key in that directory and load it and this is what I'm using uh in my example right so I'm using a new key from directory I'm providing uh part of this directory Keys address of the key I would like to load so this is that key there is address uh so yeah this is the second way and the last way is to use neonics so you know that basically that set of random words that some physical wallets could provide it for you does it make sense okay cool okay so with this Set uh set up uh our client actually ready for to to for for for making transactions so making and transactions is very simple to making eum calls uh so this is how it looks like so same we need uh a signature of the method in in this case is uh approve so once again it can be copy paste from solidity contract uh that method takes two arguments it's a spender so it's spender is an address of the contract that'll be using they be spending you know our tokens for us and and amount is the limit uh declares how much of this particular token can be spent by by this particular contract address um yeah so uh it looks almost exactly the same as making a calls so you have to use that uh pass method and code arguments provide those two arguments so first one is spender the one second one is amount which is Big integer this time we have to wrap our call in a transaction and we actually don't need to provide an additional information because all of those additional information like um transaction fee nons and so on are provided by those modifiers right so we just wrapping with uh types transaction call and using send transaction method in our in a client and send transaction will automatically sign transaction generate knows calculate fees and so on and in return uh has of our transaction so we can see if it actually works I modify it oh okay this to is already approved so maybe I will change it to the different one mhm have like token approval complete MH and uh can I expect it will be somewhere in metamask console uh okay um that's interesting uh I'm just I'm just wondering can can you can you show me once again the code like this example uh this is the first time you run it right yeah yeah and and this is you mean is private oh I know why uh it's because uh you don't have VRA ether so it trying to approve zero tokens and that's why so uh yeah this is one step I forgot to mention that you have to go to Unis Swap and gly and swap some ater to wrap ater so if you could do it right now then uh this example would work for you so we can actually try this so let's go to uh Unis swap there's two ways to do could uh I don't know if if where is if this already deployed in Gary is it so I just been using when you for doing this but uh so we can set like 0.01 for example so not to use everything it should take up to 20 seconds on gly oh yeah awesome so now we can try to run this uh code once again yeah so it sent a transaction now it's waiting uh to be in mind and yeah it's ready I'm not sure if it be visible here yeah I'm just wondering yeah because uh metamask uh only like you only knows about transaction it made uh but you have to we have to go to uh at scan and uh check your address on scan so actually try to copy this your address go to gly at scan and here it is thanks uh yeah so we can also check if it works on my computer as well yeah so approving uh approving some USD uh usdc tokens there is transaction hash now uh program it waits until it's mined and it's done and this is our transaction and this is generated call data uh so yeah so it was very simple example but uh basically it show you how you can make a transactions [Music] um the last thing uh if you if you curious like how we how how we could verify if a transaction is actually Min so uh here is very simple code which is doing this so we're just basically getting a transaction hash that was generated and we are every 5 Second we are trying to get this transaction from uh RPC node and we checking if the block hash is set if the block has is set then it means that it's already included in some block and by doing this we can verify the transaction is uh already mind okay uh so because we already over time uh so I think we could end here uh there is two more examples we could you could check at home or later maybe uh in the last example we'll actually be doing uh some uh swap on un swap uh so in this code you can specify two tokens uh which you would like to swap uh and basically this app will swap all of your W eter into usdc uh so the code becomes a little more complicated because there is some math required for Unis swap uh and yeah it's slightly complicated not much but uh I'm just don't be scared by this code uh yeah so I think we can end here uh so do you have any questions mhm uh could you explain how uh does work the encode ARX method uh encode ARX method of erc20 approve how does work uh what you mean how how it's encoded or how what exactly this mhm like how this encoded or yes why it's important why it's important okay so uh of course uh so this is important because uh you need to send this this bunch of bytes uh to our PC node and uh the way how they encoded like this format of encoding data for smart contract is quite complicated and for this simple example it's very simple you have only like selector which is Hash of the signature you have uh one argument which is an address of contact there is a second argument which is uh a value uh everything is encoded in binary uh but sometimes those signatures could be much more complicated you could have like slices like the dynamic values some string with Dynamic with dnamic size and so on and encoding this generating this manually uh it be very tricky uh very hard so that's why you need something called ABI encoder so in this Library there is bunch of code that's responsible for doing this encoding in decoding uh so there's probably like like few thousands of lines of code which is responsible only for doing this and yeah and and this and code ARS basically is doing this for you so in instead of doing this you know everything manually we can just provide this simple signature the library will pass it so we'll know what argument are expected and then if you provide those arguments in this end code arcs method we will automatically map it into those know binary values and it works VI Versa because you also need to decode data so the contract will return you some data and be also encoded in very similar way so there is a second method decode values doing exactly the same but in opposite direction so we getting by data and putting in some values so uh I can uh I can I can't uh maybe I can okay so uh I attached debugger to this code and yeah so the call data look actually like this right so there is a bunch of you know weird binary data that was uh generated for this address and some amount uh there actually another address and yeah this is why you need this uh encoding to generate call data that you'll be able to use in your call and VI Versa RPC node we return you also like some bunch of some binary data in this case just all zeros uh but you also will need to decode it and put it put it in some uh variable which you be which you'll be able to read later uh uh and all of those encoding decoding rules I described here in the documentation so here have this like big map which describes which uh solid types are how they're mapped into goang types so for example inter in 200 256 in solidity could be mapped into big in or uh integer integer and so on uh yeah so do you have any other questions uh yeah okay so every single this those example are becoming more and more complicated so in step four uh we are doing only we are only approving approving Tok tokens in step five uh we are getting also the latest price from M swap pool and in Step six we are doing the actual uh the actual swap so the every single example is just little more complicated that than previous one okay okay uh so there's no more questions uh so I would like to thank you uh everyone for uh attending to this Workshop uh I hope that it be very useful for you and and you'll be able to create something cool something cool Bots uh using uh you know this Library uh so maybe some flash BS or maybe some RP flash Bots I know there is a lot of cool things you could create or maybe some oracles or liquidation Bots like you know there is a lot of cool possibilities uh like you know there a lot of protocols uh you know allows you to you know to make some liquidations and you have to automate it and you know you can actually earn some money by doing this and this kind of Bot could be very useful for doing this kind of stuff so there is you know thousand of different possibilities uh for what you can actually use it what would be the advantage of using go for this instead of uh the more higher level uh libraries uh you mean like maybe JavaScript or ejs uh so it's only I think it's only a preference uh so in maker and now in chaps we just prefer to use goang because it's strict stcky typed programming language is very very suited for uh back end uh so it's very easy to run on you know on servers to dockerize it uh also very easy to code I believe that Goan is much simpler language uh than types skip of JavaScript and it's in my opinion it's much easier to avoid some errors and bugs and for us for our oracles it's you know obviously very important to make the scope trable uh so that's why we decided to use know goong instead of types of JavaScript um but the problem was uh that this official Library provided go by go ethereum wasn't sufficient for us anymore uh because it have a lot of limitations uh it was kind of hard to use and most importantly it turns out that go etherum Library doesn't work with Sul TOS uh and that was actually the main reason why we decided to create something uh by ourselves you mention BS so is it also an efficiency thing uh Bots uh it's hard to say uh I go like is slightly faster than JavaScript uh because you know JavaScript is very opt like right now is very optimized language um so it's very hard to say like I really don't know if those two milliseconds uh could take your advantage uh when you're doing when you're creating some flashboards uh probably maybe I don't know like what be what could be actually very useful is uh that uh this library is written in exactly the same language as go with client itself so it' be much easier to integrate uh so if you to create if you want to create some actual flashboard it might be actually easier to use Goan library that than TPT Library I was just going to add in terms of performance I think I saw someone do a benchmark regarding like JavaScript versus like go and I think the component of go that's really great is it's garbage collector because I think uh this guy had like a server where he would be like doing like pings between two different servers and long story short the JavaScript server died over time because it just didn't collect the garbage but go like was able to maintain its performance the whole time and it has a concurrency as well for handling multiple uh processes at the same time yeah that was very good point uh yeah so we don't have any more time so once again thank you very much thank you for all the question questions and I hope see you later [Applause] today

Automatic transcript — names and jargon may be misspelled.