Skip to main content

Bundle

The bundle is perhaps the most important concept, in its most basic form it is a collection of transactions. These transactions can be for any of the supported chains.

tip

Learn about bundles by creating one yourself using our visual builder. The visual builder has a button to export the JSON, use it to see what happens under the hood.

Virtual Nonce Mode​

There are currently 3 types of virtual nonce modes, lets go through how they work and what the differences are.

Disabled​

This is the most basic mode and the default mode that gets used if its not specified. Like the first example this is just a collection of transactions that will be executed in an order decided by our scheduler.

You should use this mode when the specific order of transactions is not important and when a transaction failing should not stop any other transactions from executing.

This is what a bundle looks like.

Executing this bundle with a Disabled virtual nonce mode results in it being processed in the following manner:

Note: In the above example the backend could decide to combine the two ETH transactions into a single transaction, depending on multiple factors.

Multichain​

This mode is useful in cases where you wish the transactions to be executed in a specific order, don't have the name confuse you, it doesn't have to be multichain.

In this mode you specifiy a virtual_nonce for each of your transactions, they have to be incremental starting at 0.

Simple Multichain example​

Lets take this bundle as an example, we have noted the virtual_nonce for each transaction in it as well as the chain it happens on.

Note: For simplicity this bundle is ordered by its virtual_nonce, however this is not needed, the way in which transactions are ordered is not considered, only their virtual_nonce are.

When this bundle gets executed this is what happens.

Multichain example with parallelism​

In the multichain mode you are allowed to re-use nonces, by reuseing a nonce your effectively saying that you want all transactions with the same nonce to be executed in parallel. As an example lets use the following bundle.

This would execute in the following manner.

ChainIndependent​

Docs for this mode coming soon...