1-click Cross-chain Experience for Modern Web3 Applications - ETHGlobal Bangkok 2024
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Join us for a workshop with Filip D from Biconomy titled, "1-click Cross-chain Experience for Modern Web3 Applications." This course will teach you how to develop dApps using nothing but TypeScript. The workshop will cover concepts: smart contract integration, API interactions, security protocols and teach you how to develop a dApp designed to streamline complicated cross-chain transactions with a focus on UX. By the end of the session, attendees will have a prototype demonstrating cross-chain functionality This workshops took place at ETHGlobal Bangkok, a 3-day hackathon held November 15 to 17 2024, that brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
[Music] so I'm Philip from bomy I'm head of Engineering in bomy um I want to show you what we offer for today so first I want to go from beginning B economy is having 10K prize pool split into two parts um I have compiled a GitHub repo which could be helpful for part one of um of B economy offering which is the modular execution environment which we can use to build chain abstract adaps part two we only got some helpful resources here which you can use to um build applications for the other uh other other part of the price pool using B economy smart accounts Nexus smart sessions and AI agents which is very cool um I want to start from beginning um actually from the end result of what you could build with Bon with bomy modular execution environment just to give you give you an idea and then we are going to go through the code a little bit just so for you to see how easy it is to build a chain abstracted application using our stack so this is the end result of the small demo application which I have built this is the application that has been running from this repository which you should take a look at if you want to build um with us so it's SL byc conomy Global DW Workshop um you literally can clone this repo and then build and run the project to get the same application which I'm showing you right now what this application is doing uh and I'm a solidity developer so don't mind mind this uh front end here it's a very simple thing but I connect I just connected my metamask wallet which is um um which is uh actually this one and I got myself a generated smart account wallet address which is generated behind the scenes doesn't even have to be predeployment which means that we have one nft application which is deployed on base seoa chain and it it accepts usdc for the payment of minting nfts um but me here I have usdc balance on another chain I I don't show it here but my usdc balance is actually on sepolia so what I can do with with by economy modular execution environment only on the front end part so zero smart contract development involved I can build a flow that basically Bridges funds to uh base aola chain if they if you also have to you can swap funds and then interacts with any defi or nft or any other smart contract so all of these steps you define on the front end using our straight forward SDK and and you simply encode these transactions uh very straightforward developer friendly while the users only have to sign once they don't even have to have gas they can see this cross chain operation getting executed in front of them um I'm going to trigger the cross chain mint operation right now which is going to basically uh In This Moment the front end is defining step step that are supposed to be executed the steps involve bridging usdc from my home chain which is sepolia using a crossbridge to base sepolia where the nft is sits and it's going to use those funds then to Mint an nft so as you can see here I'm doing an offchain signature with my metamask uh this message here is the root super transaction hash we call these like complex flows we call them super transactions you as a developer defined them on the front end part and uh what you get back from our SDK is one single root hash that the developer that the user has to sign and they're going to execute their operation so right now um my again sorry for the the front end part here but I got back the super transaction hash result which I can open in our in our Explorer and I can look up for my transaction with this hash so this is a a many chain transaction so we can see what's happening here um basically I paid for gas fees on sepolia that's one user op then I red funds from sepolia to base that's another user op which just got executed and now we're waiting for the final user op to be executed which is like the actual minting of an of an nft so all of this is happening behind the scenes to the user you can show just one spinner you could get like also a feedback from our Explorer as the steps are getting executed basically like the best user experience uh you can ever imagine uh if you're building anything across multiple chains or multiple D5 protocols within a single chain or whatever um like combination you can you can come up with so we are still waiting for funds to arrive at basoa but as soon as they do um you are going to be able to see the effect um of this transaction let me go back to uh this code base for a little bit before the transaction is executed just to show you how easy it is to use uh to use our SDK so this is like a react application which I have built which basically contains the um the code to interact with this with this nft contract uh across uh many many chains um the core part of the uh of the process is you should just initialize our SDK using users users um EA wallet let me show you that part so this is abstract service that's what I've called it is the service I'm going to call from my application whenever I want to interact across chains it has this important function which is called init cluster service cluster is the old name of our modular execution environment SDK which you are going to use um in this in this example we are using it here so here we initialize cluster we just give it give the cluster SDK users EA address which is going to be behind this SDK and then we can start building these cross chain flows for example this function here cross chain mint what it does is it defines bridging operation and minting operation by a very straightforward procedure so it's just literally defining user Ops and their call data very straightforward if you have ever built a transaction you know how to do this once we've defined uh We've defined bridge and mint operation we combine them together into what we call an ITX or in a new terminology a super transaction here we Define steps that we want to see executed which is bridge and mint in our case but as I've said you could put like 20 operations across 10 chains whatever um and we also defined the fee transaction so what's the fee that the user is using to pay for this whole operation as I've said the user doesn't even have to have funds on their eoa if they got any balance across their smart contracts which are uh which are generated by cluster they can use those funds to pay for phase and again all of this is happening in just one signature so once I have built an ITX object I can literally uh just fetch the quote from the cluster main instance and once I get the quote back I just have to sign once so the part where I have been signing the offchain message with my metamask this is like that part of the code right here once I signed the message which is just one offchain signature I literally call back cluster. execute again and and uh we are good to go this is the part where I got back the result of the operation the the operation the result of the operation was actually the super transaction hash which basically is not a single chain transaction it's many chains so we we have to use um our own Explorer so that we can show you what's happening behind the scenes um one important thing here is that you also should be using some of some of the bridges available today why because um you need to see funds moving from one chain to another sometimes and we are not the ones who are pro providing liquidity we are just we are just the layer that basically orchestrates transactions across many chains but you're still going to have to use maybe a cross-chain messaging depending on your use case of course or either a liquidity bridging solution in our case we are using a cross uh but as I've said like our stack is unopinionated so you could use anything uh we use across because it's fairly fairly quick uh between different l2s and um we just have to like Define a plugin for every bridge we want to use um uh this is my plugin for a cross Bridge you you define this only once or like if you guys are going to build something and you need a cross plugin you could just copy paste it from here um this plugin has to be exposed to the cluster SDK so that the cluster SDK knows how to how to pull funds from many chains to execute the operation on the destination chain important part that I have not mentioned here is that cluster SDK is the one who calculates some of these steps when it comes to bridging of course you have to Define what you want to do with the funds when they arrive on the destination chain which is in our case is a mint operation but uh um actual bringing of funds to the destination chain is basically orchestrated by cluster um you can see here that I have just called the encode bridging Ops plugin which we have here defined in our repo and I just gave it uh a basic informations okay I'm working with usdc I gave to this plugin something we call token mappings which is like uh a list of the same tokens on every chain and their addresses like in this case I have multichain usdc which is a token mapping that defines the addresses of usdc deployments on different chains so I say to this bridge plugin I'm working with multichain usdc um this is my cluster account this is how much I want to see l on the destination chain uh this is the bridge plugin and um basically um this result here results here in series of steps that have to be executed to to uh get the LI liquidity on the destination chain then we just combined this with the mint actual mint operation because now we know we have at least two usdc available um on the destination chain we just bundled this together and basically that's it so uh what what can happen here too with the uh liquidity uh bridging and and encoding steps is that our SDK can figure out that you have liquidity across many chains for example you have five usdc on polygon five usdc on optimism and you need 10 usdc on arbitrum our our SDK is going to encode steps that pull from both chains uh you don't have to take care about about this as a developer um let's go back to to the actual Explorer yes so now the uh second user op was executed to we can go to uh to act actual user op Explorer to see what happened here um by the way um this tenderly debugger and user op Explorer are very useful if you're going to build with this you could debug your user Ops uh and because they can sometimes fail of course if I Bridge uh five usdc but I want to spend 10 usdc on the destination chain of course this uh second user op is going to fail because there is no funds uh available for my operation um yeah I can see here that I have successfully executed like the final meting transaction we can copy paste the transaction hash and go to the actual base basea Explorer to see what happened there so this transaction has in fact paid for the nft in usdc and then it received the NF n nft to its smart account wallet I could have changed some other operations in this process may maybe send some nft somewhere else or literally like anything that comes to your mind probably could be built um using this approach if it involves multiple defi protocols multiple contracts which you need to call in one operation or even across many chains uh we support eight main Nets and four test Nets um I suggest using like cheap test Nets because sepolia is very expensive um I just had to pay like 18 USD 18 usdc so that's 18 um for my transaction that's because that was initial transaction which also has to deploy a smart account that's a lazy procedure that happens by default once the users interact with the with our stack for the first time um okay uh going back to the actual repo here I have tried to explain on how to how to clone this repo how to spin this project which you have just seen in action this is cross-chain minting of nfts um and you could reproduce like the whole application you could get it live and running you could actually test the cross-chain minting stuff um I also got some uh useful information here on what your environment should look like if you are going to use the me or cluster SDK which is the old name for our stack um and there's also some useful resources here you're going to have to probably use usdc faucet so usdc has an official so that's by Circle right they have the official faucet that you could use to get some usdc funds on test net I have used this for example for today to obtain some usdc to test my flow there is our full Zero to Hero guide which explains step by step how to build an application using our chain abstraction stack um then there is the uh Explorer which I have just showed you this is where you go to see what's happening between chains um then you have the node info this is something I haven't opened but we are running our public node so cluster or or module or execution environment is actually a network of nodes which provide this service of executing transactions for you as a developer and for user who's using your app across many different chains so here of course you could see like all the chains we support in the node info and also all the tokens that are accepted by the node per every chain for gas payment um you could see that there's stable coins here rep ether and stuff like that um finally um we do not have this exposed in our SDK yet but you as a good developer would like to show to the user steps that are happening as they are EX in real time so here I've put the direct link to our API of the Explorer that that you could be using to uh to fetch the details of one uh complex cross chain uh action so here we see how that looks like you're going to figure it out very soon it's just SL Explorer SL super transaction hash that's the hash that you receive back when you when the user actually executes um the super transaction and this is something that you could use to track the status of every user op as they're getting executed see here there is a list of user Ops um there's it's always going to contain a status right now it's success with transaction hash but this here could be pending for every user op initially and then as the user Ops are getting executed um you you could be you could be seeing different results here you would have to pull this URL right um okay back to repo again uh for one last thing uh so this is half the price that we in by economy offer is for chain abstraction applications using this cluster SDK um and this is a good start here this reple so This eth Global Workshop there is the part two which is another half of the prize goes to the actual bomy SDK which you would use basically to create for example AI agents that that interact with by economy smart accounts um and basically um there is a there's a piece piece of the pricee for AI agents and piece of the price for uh usage of smart sessions which is the latest thing we released we released in the world of smart accounts a very powerful module which you could be using um to build build like cool cool applications powered by smart accounts finally um we will be offering developer support this is our public group by economy Builders Group where you could just like reach out to us we we're not going to help you to build your application and win the prize but we will help you if like you have like a huge console stack trace and a bunch of red lines we might be able to help you with that of course uh you could just join using this link this is a telegram group um and and we we would be uh very willing to help you um yes that's it from me we got two more minutes left if there is any questions I Tred to spare two minutes so uh let me know yeah uh can you just yeah I saw that you made the user sign a blind hash is it possible to do that also with a with a more like with a type for example for Signature or not so it's always one root hash with always a root it's it's it's always a root super transaction hash so all the operations that are bundled inside a super transaction are described by this one hash that your user has to sign and that's basically it that's like one offchain signature you would be for example using VM which I was using in this repo to just initiate like a sign message call on the user's EA and you would literally provide the VM with the the sign message function with this root transaction hash and that's it yeah um anyone else yeah um Can super transactions fail midf flight if the transaction what happens if the transactions fail in the in the in the process the ux gets impaired a little bit because like let's say you defined an operation that Bridges 10 usdc to chain B from chain a and then you try to on chain B to you try to something for 20 usdc uh this is a developer error because the user Ops were not defined properly so what's going to happen is 10 usdc is going to get bridged but the destination chain operation is going to fail after some time our nodes are going to wait for some time to see if there is going to be any moment when the transaction is going to succeed if not they're just going to execute the transaction with status fail which is what what you are going to be able to get on our API for the Explorer um yeah yeah all right guys thanks for listening and uh I'm going to be at bonom booth on that opposite side where all the boots are if you want to ask me something come stop by feel free to talk to me thanks guys [Music]
Automatic transcript — names and jargon may be misspelled.