Tatum 🛠Introduction to Tatum: blockchain development platform
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join Samuel Sramko of Tatum for a workshop titled, "Introduction to Tatum: blockchain development platform." This workshop is part of ETHNewYork 2022, a three-day in person hackathon that will feature hackers, mentors, enthusiasts, sponsors and speakers who are all gathering in New York June 24-26, 2022 to talk about the future of money, finance, the web, ownership, the way software works and the way power is distributed. We're excited about a new frontier. ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
[Music] hi everyone i'm sam i'm cto and co-founder tatum and in this video i want to introduce you datum i want to tell you what it is what you can do with it and how datum can help you with building new blockchain applications so let's start from scratch and let's say what datum is datum is a developer framework for you for the blockchain developers to build blockchain applications fast sometimes without previous blockchain experience it means you as the developers doesn't have to know what blockchain is you don't have to know how you need to interact with the blockchain from the low-level perspective you can just come use datum and leverage some kind of pre-built basis of functionalities or building blocks and put your applications together why should you use framework like this it's it's super easy what we've seen for the last years we've seen increase the amount of new blockchains new complexity in the blockchain development the web tree space is is really huge and yet it's very very young in the early stage and there is like tremendous amount of information you can you can search for everywhere but the most important things how to build applications how to build great scalable blockchain applications how to even interact with the blockchain it is almost nowhere to find you can either find api documentation or references to a blockchain nodes to a specific rpcs with very low level features or you can just see the results and nice applications some fancy ui and ft marketplaces and whatever out there but the what's missing is the the glue between those low level rpcs those blockchain integrations and the final step and that's why we've built datum that's why we are trying to help you developers to build applications to actually see the the design patterns to see how you actually should do it what's important why why you should care about security why you should care about scalability and how to achieve that in a very let's say easy way my name is sam as i said and i'm i'm the co-founder i'm the cto of tatum i founded datum a couple of years ago with wikiri and our main idea our main goal is to give you the tool which you can leverage which you can leverage easily and we are trying to hide the complexity of blockchain development and we are trying to to let's say democratize the the blockchain development space because you either has tremendous experience with rpcs and you're a really skilled developer or you have basically no other way how to build and how to interact with the blockchain that's really shame that that why everyone can't leverage blockchain in their applications while in their projects in their products in their companies because it's a great technology with with a huge potential in general you can build anything with datum any project you want anything blockchain related there is a feature on our on our side you can leverage in your in your in your product so if you want to build some nifty marketplace you can find some features connected to that if you want to create some blockchain wallet or custodial wallet or custodial exchange there are some features we have available for you if you don't care about the custodial applications and are more into defy space and non-custodial approach we can give you tools for that as well so there is like a huge product offering from our side and and today i'm going to show you let's say top 10 features or or areas in datum you can leverage in your in your projects you can leverage in your inner development and it can save you a lot of time a lot of money and a lot of headaches during the develop so today i'm gonna show you how to actually interact with the with the datum how to build something what kind of what kind of features we we offer to you keep in mind it's not everything we have more than 300 different api calls and api endpoints available for you right now i'm just going to highlight the most important ones which i believe you can leverage right out of the box in general if you if you want to interact with the without datum platform with the data api you need to go to datum.io sign up create api key and use the api key in the api calls datum is mostly the cloud api which you can in like easily integrate in your applications basically in any programming language there's no limitation here if the programming language can call https request you can use data which is great for today demo i'm going to use postman which is uh which is a great rest api client and i'm going to show you a couple of couple of product features and a couple of let's say very quick operations you can you can start working on and building your next product so in this section uh you can see what we are going to talk about today we're going to talk about the native rpc so datum as a platform can help you as an rpc provider we run all the blockchain nodes on our site so anything you wanna you wanna build directly on a native rpc of the nodes you can use our our nodes they're all exposed and then we've built another layer on top of the rpc node because rpc nodes are are great but it's like coding in assembler if you can code in java right you don't want to code in a low level language if there is some abstraction some simplification for you which makes your life much easier so except of our pcs we have a bunch of different product offerings and one of those is a blockchain indexer which means we are actually indexing the data of the blockchains we are running into our systems and we can serve you real-time data and real-time information from the blockchain world you can read nfts by address you can see nfd's in a collection you can see transactions of erc tokens by a specific address and much more on top of that we have some features connected to the to the nfts easy minting of the nfts even without working on your own smart contract without paying the gas cost if you want to mint thousands of nfts you can just call one api and it's done you don't have to take care of anything out there one of the product features we we are proud of a lot is our fee estimation feature where you before you make any transaction you can easily call the estimate v endpoints and you can see the real-time gas prices or fees which you should which you should include in your app another huge section is the tokens where you can work with any type of tokens you can deploy your own erc tokens your own spl tokens on solana nfts 1155s and many more of course if you want to work with a blockchain and for example nfts you need to store your data inside the blockchain easily and fast and for that we have a very easy ipfs integration where you can store your files to the ipfs you can read your files from ipfs and you don't have to pay for the cost of storing the files we take care of that for you once you've done all those things once you start working with the wallet start working with some tokens usually every application needs some kind of notification about events that happened on your site for example you have either a one million addresses on your exchange and you want to be notified once some user perform a deposit on one of those addresses for that we have this great notification station feature where you can just subscribe for the book notifications on top of your address and you just receive the alerts real time in your app we have tried a lot to make your life easier especially on blockchains where it's not so easy to to develop on and one of the most let's say challenging use cases we've seen so far is covering the gas cost for some operations on evm chains for example i have received some nft on my wallet and in order to send it out i need to have enough eat on my address to cover the gas cost it's okay when you have one address you can send it there and withdraw the nft but if you have one million addresses or tens of millions of addresses like the complexity of managing such a solution is really high that's why we've created a gas pump feature which is very let's say easy way to work with the tokens on on your addresses and in general you just gonna cover the gas cost of all transfers of all tokens on different addresses from one place in your app from one private key which is great it can save you tremendous amount of money and headaches another great feature we have inside the app is virtual accounts it's something which is our own proprietary solution where you can basically create your own accounts inside our platform inside our system and those accounts could mimic the blockchain behavior you can use those accounts for for fiat support in your app you can use those accounts for easy let's say easy accounting of what's happening in your application you can use those accounts for some off-chain features that you don't want to transfer all transactions on chain for your users but you can very easily perform instant transat transactions between accounts inside your app another powerful feature most of users are leveraging this we're gonna get there what's behind it so let's start very high level what i mentioned from the top are pcs if you want to work with the rpc on our side we have one unified endpoint for all chains we support the endpoint is v3 blockchain slash note slash chain you want to work with right now i'm going to work with solana i perform simple get block call to the to the rpc node if you wanna work with a different chain you just enter it or you can enter matic as a polygon you can work with cello you can be a c you can work with all ground and any other chain we are supporting there is an rpc endpoint anytime you're building application you don't want to leverage any let's say additional features we are supporting or you have your application already built running on your own nodes and you don't want to maintain them anymore you can just pass this one simple url and you can easily switch it's that easy usually when you are integrating those rpcs in your application you need somehow to read data from the blockchain not all data are available from the blockchain node itself most of the data must be actually queried periodically as they are writing to the chain and you need to store those data index them and then you can serve them once you've integrated rpcs into your application you want to read the data because you don't want to write only you also want to see what's happening on the chain in order to do that you can leverage the note for the operations it supports i don't know get a blog or get transaction but if you want to maintain like more complex data in your app and you want to read some transfers you want to read some crazy operations on nfds these information are not available in the rpc node itself you need to index those data manually store them on your database solution somewhere in your app or in a cloud and then you can query the information it's okay to do it for one note for one chain if you want to do it for five chains is a nightmare if you want to do it for 10 chains disaster and usually applications these days are not built on one chain only they are built in multiple chains we have a solution for you is our blockchain indexer feature where you can actually read the information from the blockchain for anything basically we are supporting so we are storing those information on our site indexing them for you and you can just read them for example one operation which is worth mentioning is i want to see all nfds under a specific collection so again we have some unified endpoint for that you want to see an ft collection for polygon and this is the address of the collection and you can see some information about the tokens available in the collection with the metadata available as well another could another interesting operation could be i want to see all nfts which sits in my address right now i'm using so on a blockchain without with some specific address and again you can see which kind of nfts you own in the address with the metadata available so these kind of information are available for you you can easily query them from our blockchain index there's many more not just these you can see the account balance of a specific spl tokens on solana for example or you can see if you want to work with the with ethereum you can see ethereum transactions by a specific address in let's say very low level raw format there are many more in many more operations like this you can find them in our api documentation talking about api documentation if you want to work with some of those api calls you go from the main page to the resources to the api docs section and you can see our api reference right now i was talking about the node rpc about the rpcs we are offering so you can see in the first section the node rpc and list of all the blockchain we are supporting our pcs for so if you want to work with any of these chains you can easily leverage the same url which has a different chain you want to work with when you want to work with some nfts those are under the smart contract section under the nfds fungible token etc etc so the features here they're here for you you can just full text search i don't know get ethereum transactions by address something i was showing right now and you can see the api operation here so that's the blockchain indexer so you have our pc application and you can read the data great this is like something most of the projects actually need they need to write they need to communicate with the node and they need to read the data from the node now we are going to talk about more advanced features something you will have to spend a lot of time during development and we are going to talk about the nft express nft express is a set of features we are offering to the to you to developers where you can easily meet nfts without taking care of the smart contract development without taking care of the blockchain fees the only thing you care is the metadata you want to attach to the nft chain you want to work with and the recipient of the nft er these all are the only thing you need to know you need to leverage if you want to mean something we take care of all the rest so if you want to meet nft you can just mint it on polygon for example and you can see the transaction id this operation minted nft on our own internal smart contract something other chains are doing as well where they are minting random nfts random people under their own smart contract if you want a more advanced solution you can mint nfd using nft express and you can mint them on your custom contract if you already have an ft contract you can enable it to be that you can enable the contract that datum and datum address could mean on top of your contract and then the only thing you need to do is again recipient the url use the minter which is our own internal address you can find it in our documentation and you will define your own contract you want to mint on and you can include a token id you want to mean the token and again you don't have to cover the gas codes you don't have to do anything we take care of all of that you can see the result are the transaction ids pointing to the tokens minted on the blockchain for some applications they already have done all their hard work before but they are missing fee estimation feature if you want to estimate a fee on a blockchain it's not so easy because you know there is so many transactions happening on the chain mempool is full of transactions and the validators or miners are actually picking those transactions based on the highest fee based on some other priorities so if you don't want to be stuck in your app for for i don't know a couple of hours because you have used not sufficient fee for your transaction to to be processed by the by the blockchain you need to be notified or you need to know what's the situation on the chain was the probable situation in the next 5 10 and 15 minutes and you need to adjust your fees of transaction so they can pass quite easily for that technically you need to do a lot of things you need to monitor the mempool you need to see the history of the previous blogs and transactions and the fees happening there and do some crazy algorithmic mod to achieve some powerful results you don't have to we have that covered for you so if you want to estimate a fee for transfer of the erc20 token on ethereum you can call the estimate fee and you can see the gas limit and the gas price if you want to see the estimation for some more complex smart contract operation for example on polygon there is a custodial transfer from one of our features you can leverage this if you want to estimate the fee for a bitcoin you can again just pass the bitcoin as a chain an address from which you want to transfer an address to which you want to transfer and again you will receive some you'll receive some estimations of the of the fees so this is really powerful this is great you can see what's actually happening on the chain you can see what the fees should look like in the near 5 10 20 minutes when we're going to talk about the tokens there are multiple types of tokens you can work with you can work with when we are talking about we are talking about evm chains ethereum polygon et cetera et cetera there are mostly three token standards which are used 99 percent of cases when we are talking about tokens in drc 20 or fungible tokens it's erc721 non-fungible tokens aka nfts and erc1155s which is semi-fungible tokens which is a combination between fungible non-fungible something like an nfd with multiple editions of the same token we can support you with all of these tokens if you want to include them in your application you can easily deploy any type of this token you can easily transfer those tokens burn those tokens read information from the blockchain about those tokens you can do really a lot of things with just one simple api call so let's just try to deploy new erc20 token on a binance smart chain with some initial supply with some initial recipient with name and a symbol you receive a transaction id we have a handy utility function where you can actually read the contract information from the contract deployment transaction from the chain and you can see that this is our new main ddrc20 token then let's transfer some of those erc20s from one address to another how much how many decimal places the contract has which blockchain you want to work with again if you want to change bse to cello or to ethereum or dramatic or to harmony you can do that with just changing of one parameter so we are trying in all of the api calls to follow the idea code once deploy everywhere where you just do the integration for the first time and then you can just change the chain you are working on so let's try to transfer those tokens and let's take a look on the explorer to see the transaction and that it really went through and you can see we have sent nine datum demo tokens from one address to another same setup applies for deploying your own nfd contract you just create a contract with the given symbol on a chain from a deployer and you just fire the request and it's done same applies for 1155 you're just deploying the multi-token talking about the tokens as i said before all our smart contracting or features connected to the some smart contracts are available under the smart contract section where you can work with seven to ones or compatible erc20s or compatible 1155s or compatible when i'm talking about all or compatible on some blockchains for example on solana the erc20 token and erc721 token is already a blockchain standard called spl tokens and you just work with the standard you don't deploy your own contract you just work with a blockchain defined standard same applies for algorand when there is already some asset on the chain which you can leverage for for all the token operations as i said before when you want to work with nfts you usually wanna or need to store some data connected to the nft ideally on some decentralized storage for that we have ipfs endpoint where you just select the file you want to upload and you just stored it file to the ipfs once the file is uploaded you'll receive the identifier from the ipfs the result is the ipfsh which is identifier of the file and when you want to read those data from the ipfs you just enter the identifier of your file pin to ipfs and then you will see the results we can see these were just some compilation metadata from the form of smart contracting so ipfs super simple two api calls store read nothing crazy very straightforward we are going to the more let's say advanced and cool stuff and i really love the notification station feature because that's something you don't even think that you need unless you realize that you really need it because let's be fair you want to know what's happening in your application your users want to know what's happening in your application and what's the other way to know what's happening if you if not notifications so in general the flow is very simple your user signs up you create an address for him your application it's up to you it could be exchange marketplace wallet whatever once you have address for the user you will create a subscription on that address and from that second you start monitoring those address and you'll receive all transfers incoming or outgoing on top of that address we'll do it on solana we just create a new solana wallet and we'll create a new subscription so we have multiple types of subscriptions the one i'm going to show today the address transaction subscription type where you're just going to subscribe to the address on a solana chain and url is the url of the of the endpoint we're going to send the notification to i'm using this cool cool uh feature called the webhook site where you can actually create your dummy listener for for webhooks you can copy the the url to the to the clipboard and we have created a subscription so from now on every time anything happens on your address that's gonna mean nft to to that address we are talking about right now i have minted an ft to this specific address on solana again using the mint endpoint and from now on nft was minted and if i want to transfer some solana for example to the token to that address as well i can transfer some small amount of salt tokens to that address you will be notified on the webhook side or on your listener in our case the webhook side that something has happened on the chain that there was a incoming nft operation that there was an incoming solana transfer if we transfer something from the deserts away you will be notified about outgoing operation we can check the webhook site now if there is any webhook fired and we can see right now that we have received two web hooks webhook number one that we have received a token on on address with the transaction id paper number two that we have received native solana tokens this was the amount of the soul on an address in a blog with a transaction id super simple super powerful nothing crazy if you want to build this by yourself you need to run your own node you need to query every even every transaction every blog on the chain and listen to it yeah could be a fine programming work but trust me you're gonna you're gonna spend a lot of time on that gas pump as i said at the beginning gas pump is one of the features we are very proud of a lot of projects are using that because every time there is some project coming to us and they are asking how can i pay the gas cost from uh nft transferring how can i pay that i want to pay it from one place i don't want to pay from 20 000 places we say yeah it's great you can use our gas pump feature our gas pump feature is basically you are creating one smart contract wallet for each of your users and that smart contract is owned by one specific owner and every time you receive anything on that smart contract wallet you can transfer those tokens from one private key with fees covered from that one private kind that one address so only owner of the smart contract bullet of your gas pump wallet can transfer the tokens out and can pay the gas cost associated with the transfer which means you don't have to send tokens for covering the gas cost on a custodial on a smart contract wallet you need to have all your fee budget in your one place so let's use cello let's create one wallet and this is the owner address from the transaction id you can read the wallets or smart contract wallets generated from the transaction is the only one we can use cello faucet to send some tokens to my smart contract wallet we can check in the explorer that the address is actually funded you can use this contract address not the regular address and you can see that we have a couple of tokens here that we have cello dollar cello euro and sell native assets right now let's transfer some of the cello euro erc20 token from that smart contract wallet to someone else without the necessity to have a cello on the wallet so we've performed a transaction and you can see that it's this transaction where we have actually transferred we have actually transferred some cello euro without any balance change on the contract wallet you can see the only balance change is a seller euro because the gas was paid this is the transaction and the gas for this was paid from the owner of the of the address so this is very high level our gas pump feature which is really great you can create a lot of stuff with this especially in a custodial space when you want to onboard your users very easily into your application when you want to cover the gas cost for them this is the easiest and usually the only way how to do it you need to deploy some smart contract and work with that let's start with something easier before the virtual account so let's talk about the custodial services we offer one of the custodial services we offer is the managed wallets very simple stuff you basically can create the managed wallet by on our platform which means we are storing the private keys for you you just create the wallet you just create the address and you receive the identifier of the address you don't have to take care of the private keys we take care of them once you want to expose or once you want to read the details about the wallet and export it to your users you can just get the wallet details via the identifier and you can see the private key as well if you want so very simple setup if you don't want to manage your private keys if you just want to create the wallet and then just export and expose it to your users you can use these two api calls create and get another cool feature we have is the exchange rate here it's one simple api call where you get the real time exchange rate of any crypto asset you wanna so let's take a look what's the current bitcoin value and we can see it's 20 000 euros so if you want to check what's the value of solana you can see it's something about 35 if you want to take a look on the i don't know on usdt was the euro value of the usdt 0.94 very simple real-time monitoring of the crypto assets of the exchange rates including your application users can see what's the status very simple operation and now we are like we have last two things to to go through is the virtual accounts and is then ft marketplace or the auction let's start with virtual accounts because i believe they deserve that let's start with the fiat support as i said virtual account is a feature in our in our api where you can work with the fiat with the sa in the same way as with the cryptocurrencies you create your own accounts of a specific currency you can perform transactions between those accounts you can list those accounts list transactions on top of those accounts everything is outside of the blockchain you have instant settlement without any fees if you want you can connect your virtual account to a specific blockchain address and that virtual account will be feeded with all deposit operations that happens on the connected address and you can work with crypto in the same unified way as you are working with a fiat or any other currency this has a great great potential when you're working with multiple chains and the best example how to imagine like hey what the hell is i'm talking about imagine some custodial exchange for example binance when you sign up for binance you're actually the binance actually creates a bunch of accounts for you for bitcoin for ethereum lending staking trading a lot of stuff all those accounts and all those balances in those accounts are virtual accounts something stored in their systems and every time you want to deposit some crypto you are generating the blockchain address and the blockchain address is associated with a virtual account right on their system you perform the deposit the deposit comes to a finance address and binance detects the deposit and increase the balance on their accounts you are not working in binance with a blockchain address they work with their own virtual accounts with their own system on every operation they they are supporting they they're like the split between the blockchain world and the virtual world is very strict you actually are using blockchain addresses only as a deposit ones everything else is in virtual accounts so let's show you how to create some virtual currency we can create a virtual currency we just give it a name let's say i'm gonna create my own us dollar so i'm gonna call i'm gonna create virtual currency us vc usd sam with initial supply of zero assets what has happened i have created on the background in datum virtual account i've created new virtual currency and the virtual account has a zero balance what i wanna what i can do right now i can easily mint new supply so i'm gonna create 10 new us dollars in my app and i'm gonna add those supplies to the account id i have created before so let's create new 10 usd dollars you can imagine the full why should i doing this hey sam what you're doing imagine you have application where you have a lot of users they want to deposit some some fiat currency to yours to your app they're gonna use paypal stripe whatever and once paypal sends you the web book hey i have performed the payment they have sent me ten dollars you can then mint new virtual ten dollars into virtual accounts and you mimic the real fiat values in your system and you can like pair it every time your users want to pay out and they wanna and you're gonna send them by wire transfer against strike or paypal some money out of your app you can actually destroy the balance inside your virtual car account and send the money away so there is like this connection between the real world and your application let's create another account let's create another account with the same virtual currency again we do zero balance and then we can transfer between those accounts between the the main one where we minted something to the newly created one so right now you have performed the virtual transaction instantly without fees with the with basically zero response time if you wanna see what's actually happening in your in your accounts you can see the get transactions by id and you want to see the transactions for and you can see that okay i have performed mint of 10 us dollars and then i have sent 10 us dollars from my account to someone else with some additional details so again very simple very straightforward if you want to see where in the api dock is this it's in the section of the virtual account when you want to work with virtual currencies with accounts with transactions you can see there is much more to it when we are talking about the gas pump before gas pump is a smart contract type of the operation so it sits under the smart contract section and the subscriptions it's in a notification subscriptions the same logic like for this fiat operations applies for crypto so if you want to work the same way or integrate the same way your fiat and the cryptocurrencies you can use the ledger accounts for these right now we have we are going to create new virtual account for solana again the same input same output what we're gonna do on top of it we're gonna pair the account we have created with some specific blockchain address i need to create a new solana bullet we have assigned address on the blockchain with this with this virtual account and right now if we transfer something some solan assets to this address your virtual account balance will be increased and you will see that blockchain transaction inside your virtual account you'll see the balance you'll see the detail of the transaction if you want you can create multiple accounts you can build create not only solana you can build accounts for a bitcoin you can build accounts for ethereum you can build accounts for a polygon right you can build accounts for usde it's really up to you every time you want to support some asset you can create a virtual account for it you will assign an address for it and you have done this interconnection if you wanna like then once we have created these let's say five accounts right now we have added all the accounts under one common customer which usually represents your user in your application with some kind of external identifier so anytime your users sign up to your application you will create a couple of accounts for them and connect them or glue them together via external id the result of the account contains a customer id and then we can check accounts of a specific customer and you can see i have done that before i have a lot of accounts under one specific customer for different chains those are the formatic for ethereum for bitcoin this is our account for solana obviously the the transfer of the nuts 0.001 sol was successful and we can check the details of that operation under get transactions by account operation and we can see that we have processed the deposit this is the transaction id this is the receiving address this is the amount of sold tokens we have received there is obviously much more than that you can block amounts on the account you can send crypto from your virtual account and from a specific private key somewhere else so there is a lot of logic hidden here but you really can do a lot of stuff you can really build your application on top of the virtual accounts where you're gonna support tens or hundreds of assets and on different blockchains using the same integration using the same way and you're gonna save tremendous amount of money tremendous amount of time and basically your time to market will be five percent of what would you have done directly with rpc nodes last but not least we have some nft some nft marketplace slash auction features which basically creates your own on-chain smart contract marketplace on a different blockchains you can then list your nfds on that auction on the marketplace you can buy then the nft as a buyer from the outside world or you can beat in the auction if you are talking about the auction and you really can build your own marketplace logic on the chain something similar what openc does or or other marketplaces really straightforward smart contract for old chained or marketplaces details for that again in the api section under the smart contracts in the marketplace or auction fields so this was a high level overview of tatum of the framework and of the product offering we have for you you can pick whatever you want it's really based on your use case if you want to work with rpc or with rpc we don't care we just we're just here to help you just here to help you build and scale if you want to work with indexers or some other features feel free it's super easy the only thing you need to do is to go to tatum.io sign up in our dashboard you can sign up via google or anything else in the dashboard you will create your api key it's free if you want you can build you can create free api keys and then just copy the api key and you can do whatever you want you can play around with any url with any operation with any feature it's just here if during your build time you want to ask us something you are not sure how the operation works you can always reach out to our discord which is which is our main community channel where you can go discord slash datum anyway you will go to our discord channel when people are asking questions our team is there trying to help you guide you show you s show you some next steps or where you should reach out again there's a huge api reference and if you wanna if you wanna read some guides or guides or tutorials it's also available on the resources under our documentation here's a link to the discord and of course last but not least we have quite a big quite a big youtube channel where there are a lot of videos a lot of tutorials a lot of guides where you can just where you can just see our our channel a lot of information is available there so thank you guys and happy coding [Music] you
Automatic transcript — names and jargon may be misspelled.