dApps building on Buburuza.
Buburuza supports rapid decentralized application (dApp) development using standard Ethereum tooling. This section walks you through building and deploying your first Solidity dApp using Remix, connecting your wallet, and migrating into production.
Why Build on Buburuza?
EVM-Compatible: You can deploy existing Solidity smart contracts without rewriting them.
Low Fees & High Throughput: The L3 architecture ensures transactions are fast and cost-efficient (paid with BUBU).
Seamless Developer Experience: Use familiar tools like Remix, Hardhat, ethers.js, etc.
Enterprise-Ready: Strong consistency and settlement guarantees make dApps reliable for real-world use.
Quickstart: Example dApp with Remix
Here’s a walkthrough (based on the approach in Arbitrum’s docs) to build a simple dApp on Buburuza:
1. Prerequisites
A browser-based IDE (Remix) — no local setup needed.
A web3 wallet (e.g. MetaMask) configured with the Buburuza network.
Some testnet BUBU tokens to pay for gas.
Basic familiarity with JavaScript and Solidity.
2. Write a Simple Smart Contract
Let’s create a contract similar to the “cupcake vending machine” demo:
This contract allows users to claim “tokens” (or assets) once per hour.
3. Compile in Remix
Open https://remix.ethereum.org.
Create a new file (e.g.
BubVending.sol) and paste the contract code.In the Solidity Compiler panel, select a matching compiler version (≥ 0.8.20).
Compile → make sure there are no errors.
4. Connect Remix to Buburuza Testnet
In MetaMask, ensure the Buburuza Testnet network is selected.
In Remix, go to Deploy & Run Transactions → Environment → “Injected Web3” (connect MetaMask).
Confirm Remix is communicating with your Buburuza Testnet wallet.
5. Deploy the Contract
Under Deploy & Run, select
BubVendingcontract.Click Deploy — confirm the transaction in MetaMask.
After deployment, you get the contract address.
6. Interact with the Contract
In Remix, expand the deployed contract’s interface.
Call
claim()→ you’ll trigger a transaction (costing BUBU).Call
getBalance(<your address>)→ this is aviewcall, free to run, returns your balance.
7. Migrate to Mainnet
When you're ready to go live:
Switch MetaMask to Buburuza Mainnet.
Use a deployment script (Hardhat, Foundry) instead of Remix if you want automated, repeatable deployments.
Ensure you have enough real BUBU to cover gas.
Monitor deployment and verify your contract in the Buburuza Explorer.
Tips & Best Practices
Estimate Gas Correctly: Use
eth_estimateGasor custom estimation methods that account for L3 + L2 data cost.Minimize Contract Size & Calldata: Smaller contracts and leaner calldata reduce both execution and settlement costs.
Use Upgradable / Proxy Patterns Carefully: If you use proxies, ensure you've thought through upgradeability safely in a multi-layer environment.
Test Thoroughly on Testnet: Run your dApp through edge cases — e.g. failure modes, reentrancy, gas exhaustion.
Use Events & Indexers: Emit events for front-ends to pick up key state changes (e.g. claims, transfers).
Security Audits: Especially for dApps used in production, always audit smart contracts and simulate misbehavior.
UI Integration: Use libraries like
ethers.jsorweb3.jsto connect your frontend; handle network switching between testnet & mainnet.
Last updated
