Neon EVM 🛠Ethereum dApps Deployed & Run on Solana
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join us for a workshop titled, "Ethereum dApps Deployed & Run on Solana". Some of the most skilled web3 developers, designers and product builders from all around the globe came together for a weekend-long hackathon at ETHGlobal New York 2023. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Music] I'm integration lead for neon evm so how many of you are developers and hackers here are there any hackers okay nice how many of you use hard hat development framework okay only a couple how many of you use Foundry wow a lot of founder users okay that's good and yeah today I will talk about what neoni VM is and how do we help scaling ethereum dabs so I guess for all of you happened a lot that you know you wanna swap your uh 10 usdc into some or scam coin on ethereum and basically at the same time some the Gen nft collection is you know out and trending and everyone tries to Mint it and basically gases are going to eat like all of your 10 usdc that you have uh you know saved for uh for months and uh I think that's pretty you know bad and um uh you know one of the main uh I would say disadvantages for ethereum is that uh one trending dab can congest the whole network and this actually is not really beneficial for all users so what did we build in neon evm is we built an evm that is using the architecture and basically execution layer of Solana and a lot of people and hackers ask me is it a layer 2 is it a layer one uh actually it's not it's neither alert to it's nor a layer one it's actually something in between and let me just show you a quick slide of the architecture so as you can see uh neon evm is actually not anything more than just a smart contract in Solana that can execute ECM byte code in insulana virtual machine so we have built a smart Contracting rust that understands of easy and bytecode and can execute this byte code without the Solana virtual machine but with with only having this uh smart contract basically we can't really bring up ethereum developers and evm users because basically they would need to change their Tech stack and ethereum users can't really use um metamask or their evm wallets so we have uh also one more uh pretty important component called the ECM called the neon proxy and as you can see the neon proxy on the one side actually accepts ethereum-like transactions it provides a uh just an ethereum RPC API and on the other side it unwraps the ethereum transaction creates a Solana transaction and calls our neon egm program inside and um and you're gonna ask okay how do you uh how do you for example uh solve scalability issues and it's simple it's simple because of Solana parallel execution and actually how Solana works is that let me just show you one more slide yeah I think soana is actually stateless and basically when constructing a solar transaction this is actually what the Solano transaction looks like and as you can see below the header we have the account list so this account list basically defines all the accounts that are going to be read and written to for this transactions so if we have two different dubs let's say we have uh one Dax and one NSD collection and if the same uh if we have two same transactions posted at the same time those transactions are going to be executed uh not sequentially but uh parallel it and that's actually um the the whole example that I gave you that one dub cannot congest the whole network actually holds for ethereum but the hold for Solana the gas prices will go up only for that app but for uh other adapts the gas prices will remain low and this is something that you can actually use um and also let me just go to the other slide so we enable developers Deploy on Solana but without changing their Tech stack the same as users they can use metamath they can use their evm accounts so if you are using hard hat if you're using Foundry it's all right you just change the RPC to our RPC and you can deploy um uh another good thing is that we our main aim is to become fully interoperable with Solana so uh for now we only showcase uh and I'm going to show you how we can deploy a Solana SPL token with uh as a wrapped erc20 and uh basically you can underlyingly mint you can underlyingly transfer from your metamask and svl token and you can use in your dub so uh let's just go and see this is just a very very simple um hard hat project and this is the interesting part so you can see we have a token that is called ERC for SPO and you can see something very interesting here here are the two Solana token programs that are basically in the only VM has a pre-compiled contracts that can interact natively with Solana SPL and metaplex and you can see we have wrapped the whole erc20 interface with uh with calling the underlying SPO token so we also have um we also have a deployment script you can see so what the diploma script does it deploys a token and then after that it means to the deployer account just 100 tokens so let me show you um let's just run and wait a little bit let me just show you what in the configuration we have to do basically as you can see we only add neon devnet as um another network if you go to Neon docs you can see that uh here are all the materials so you can see how to configure uh and choose devtools we have the neon faucet basically you can connect to your meta mask just request 100 tokens you're gonna see our metamask yeah we have received the tokens and yeah you can just go ahead and deploy so our token is deployed if we come and see uh find your scan yeah so this is our native Explorer so if we go to devnet okay and now you you can see that we have two um two transactions the first is contract created and the the second one is mint uh basically we can also if you want uh we can basically verify our contract um let me just see we need yeah we need the four the four parameters and we need to deploy address let's just take it from from metamask because that's the deployer Okay so now we should verify our contract again if the same is verifying with other scan um okay false byte code mismatch maybe we need to um Lestrange okay anyways uh let's just not lose time with that and I want to show you some interesting things here in this transaction so if we come and basically add our uh token I guess uh the the problem here is in hard hat um some cash so if I had uh just uh cleaned all the cash and artifacts uh maybe it will work so so a big deal um they just add our token in our okay you can see we have the token and we have 100 tokens so the most important thing is that you can see the transaction hash and you can see we have one underlying Solana transaction right because we have deployed our contract on Solana and it's an actual if we click we can basically see that this is the Solana Explorer and we can basically see that we have minted a hundred tokens all Solana on SPL so that showcased that we have actually interacted with the Solana SPL program and let's just try to um you know we have the token here right now let's just send it to let's say this account just copy this account um I'll just send 50 tokens here so right now we are transferring from one account to another ECM account but underlyingly we will also perform the SPL transfer in Solano Network so it's confirmed let's see what happens so so this is the transfer as you can see we we can see from that we have transferred and also we have one underlying Solano transactions and the file transaction actually transfer from this account to the other as you can see this is something interesting uh here the addresses are the same but actually the transfer from N2 is actually in this uh account uh metadata because um basically Solana is um a little bit different than ethereum Solana is stateless so um I can show you another slide um this is a typical folana program uh in a nutshell Solana is like a big file system so you have two types of uh accounts you have program account and you have a data account so you can see that a Solana program uh he has some executable BPF bytecode and we have a flack executable so this is an execute executable stateless contract and how does the contract creates a state by itself is it creates a Solana data account for itself and actually saves the state there so basically how neon easym works is basically Noni VM is a stateless smart contract that can execute bytecode and um you can see we have neon account which is like an externally owned account which is like a data account and inside the data we have all the ethereum metadata for example ether address known balance and so on and uh for example do we can neon VM can deploy another contract and the same dose contract when they want to save their state they create their self uh another data account so that's uh that's pretty much it uh I think we have uh uh three or four minutes left so I'll just leave it for um for some questions so as we can see we have native interoperability with Solana but in the future we we will try to achieve a full interoperability so the developers can use any contract can integrate with any Solana smart contract only by uh using solidity and using their evm devtools yeah I'll leave some time for questions if you have maybe something interesting like we have all the most important materials uh here in our um uh in our docs we also have some tutorials how to deploy it hard yet and and so on and so on so you know it doesn't really matter how if you want you can just start as a beginner and just Deploy on your own evm it's not it's not that hard maybe yeah maybe I can share something interesting that we are almost going to uh start and introduce support for Solan nfts so for Builders that are interested in some Solana collections they can deploy their dabs on neon evm and basically use their Solana collections soon and introduce them to their dub or if you want to use Solana liquidity you can just let's say deploy a unisol V2 fork and basically deploy a pool with SPL tokens and Solana or deploy a pool with from like maybe create like a hybrid pairs like SPL and drc20 pair or anything like that so it brings up a lot of other possibilities for um you know fortify as a
Automatic transcript — names and jargon may be misspelled.