Elder.js Documentation
Official Elder.js documentation for rollup interactions
Join the Community
Get support and connect with other builders
Shib Alpha Layer provides seamless rollup interaction through the Elder testnet, enabling developers to connect, prepare transactions, and send them to rollups with instant confirmations.
Connect to Elder Testnet
The first step is to establish a connection to the Elder testnet. This involves signing a message with your Ethereum wallet to derive your Elder address and public key.Basic Connection Setup
Understanding the Connection Process
When connecting to the Elder testnet, the function:- Signs a message using your Ethereum wallet
- Derives your Elder address and public key from the signature
- Returns connection details including both Ethereum and Elder addresses
The
elder_address and elder_public_key are crucial as they’ll be used when building raw Elder transactions.Prepare Ethereum Transaction Object
Before sending a transaction to the rollup, you need to prepare an Ethereum transaction object. This can be aPreparedTransactionRequest, PopulatedTransactionRequest, ContractTransaction, or any TransactionLike object.
Send Elder Transaction
Once you have prepared your transaction, you can send it to the Elder network using the following code:Using the sendTransaction Function
To send your prepared transaction to the rollup:Transactions are confirmed in seconds with instant inclusion finalities, providing a seamless user experience.
Complete Example
Here’s how you might use these functions together in a complete workflow:Environment Variables
Make sure to set up the following environment variables for your application:Use with Viem
If you’re using Viem instead of Ethers, you can convert your Viem wallet client to an Ethers signer:Key Benefits of Rollup Interaction
Instant Confirmations
Transactions confirmed in seconds with instant inclusion finalities
Enhanced Interoperability
Seamless cross-chain operations with improved security
Single Account System
Use your existing wallet to interact with multiple rollups
Developer Friendly
Simple APIs and comprehensive documentation for easy integration
Next Steps
Now that you understand how to interact with your rollup, you can:- Develop smart contracts for your rollup
- Create dApps that leverage the rollup’s capabilities
- Integrate with existing Ethereum applications
- Build cross-chain applications using the enhanced interoperability features
Interacting with rollups on Shib Alpha Layer provides instant confirmations, enhanced interoperability, and a unified account system that simplifies development. Join the ecosystem that’s bringing Web2 simplicity to Web3 innovation!