bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 54쪽 중 41쪽
Wallets and Transactions
<details>
<summary>Q: What is a digital wallet?</summary>
A: A digital wallet is a software application that allows you to store, send, and receive cryptocurrencies. It contains your private keys (which prove ownership of your funds) and public addresses (which others can use to send you funds).
</details>
<details>
<summary>Q: How do I set up a wallet for Somnia?</summary>
A: Since Somnia is EVM-compatible, you can use popular Ethereum wallets like:
* MetaMask (browser extension and mobile app)
* Any EVM Compatible Wallet.
* WalletConnect-compatible wallets
Simply add Somnia's network configuration to your existing wallet.
</details>
<details>
<summary>Q: What are transaction fees on Somnia?</summary>
A: Transaction fees (also called "gas fees") on Somnia are significantly lower than many other blockchains due to its high-performance architecture. Fees are paid in SOMI for mainnet and STT for testnet and vary based on transaction complexity.
</details>
<details>
<summary>Q: How long do transactions take?</summary>
A: Somnia offers sub-second finality, meaning most transactions are confirmed in less than one second, making it ideal for real-time applications.
</details>
<details>
<summary>Q: What can I do on Somnia Network?</summary>
A: You can:
* Transfer tokens between wallets
* Interact with decentralized applications (dApps)
* Participate in gaming and social applications
* Use DeFi (Decentralized Finance) protocols
* Create and trade NFTs (Non-Fungible Tokens)
* Participate in metaverse experiences
* Build Real-Time Application
</details>
#### Security Best Practices
<details>
<summary>Q: How do I keep my wallet secure?</summary>
A:
* Never share your private keys or seed phrase
* Use hardware wallets for large amounts
* Only use official wallet applications
* Double-check addresses before sending transactions
* Keep your wallet software updated
</details>
***
## Developer Guide
#### Smart Contracts and Development
<details>
<summary>Q: What programming languages can I use for smart contracts on Somnia?</summary>
A: Since Somnia is EVM-compatible, you can use:
* Solidity: The most popular smart contract language
All existing Ethereum development tools work with Somnia.
</details>
<details>
<summary>Q: How do I set up a development environment for Somnia?</summary>
A: You can use standard Ethereum development tools. Use the stepper below to explore common tools and their roles.
Hardhat: Popular development framework for compiling, testing, and deploying smart contracts.
Truffle: Comprehensive development suite that includes testing, migrations, and contract management.\
\
Remix: Browser-based IDE ideal for quick prototyping and testing.\
\
Foundry: Fast, portable toolkit for building, testing, and fuzzing smart contracts.
</details>
<details>
<summary>Q: What are decentralized applications (dApps)?</summary>
A: dApps are applications that run on blockchain networks instead of centralized servers. They use smart contracts for backend logic and typically have frontend interfaces that users interact with through their wallets.
</details>
<details>
<summary>Q: How do I get test tokens for development?</summary>
A: To get Somnia Token (STT) for development on Somnia Testnet:
Join the Somnia Discord server, Go to the #dev-chat channel, Tag @emma\_odia (Somnia DevRel) Request test tokens
Alternatively, You can request for test tokens [here](https://cloud.google.com/application/web3/faucet/somnia/shannon), limited to 1 STT per day.
</details>
<details>
<summary>Q: What development resources are available?</summary>
A:
* Documentation: <https://docs.somnia.network/>
* GitHub: Official repositories and examples
* Discord: Community support and developer chat
* APIs: Standard Ethereum JSON-RPC APIs
</details>
#### Deployment and Testing
<details>
<summary>Q: How do I deploy smart contracts to Somnia?</summary>
A: Use the same process as Ethereum deployment. Steps:
* Compile your contracts.
* Configure your deployment script with Somnia network details.
* Deploy using your preferred tool (Hardhat, Truffle, etc.)
* Verify contracts on Somnia's block explorer.
</details>
<details>
<summary>Q: Are there any differences in gas optimization for Somnia?</summary>
A: While gas optimization principles remain the same, Somnia's high performance and lower fees mean:
* Less pressure for extreme gas optimization
* More room for feature-rich applications
* Better user experience with lower transaction costs
For more details on Somnia gas model, check [here](https://docs.somnia.network/developer/somnia-gas-differences-to-ethereum)
</details>
***
## Technical Reference
#### Infrastructure
<details>
<summary>Q: What APIs are available for developers?</summary>
A: Somnia supports standard Ethereum JSON-RPC APIs, including:
* eth\_\* methods for blockchain interaction
* net\_\* methods for network information
* web3\_\* methods for client information
* WebSocket support for real-time updates
For a complete method reference, see the [JSON-RPC API documentation](/developer/json-rpc-api).
</details>
<details>
<summary>Q: What consensus algorithm does Somnia use?</summary>
A: Somnia uses MultiStream Consensus, an advanced consensus mechanism optimized for high throughput and low latency. This consensus algorithm is specifically designed to achieve over 1 million TPS with sub-second finality.
</details>
<details>
<summary>Q: How does Somnia achieve such high performance?</summary>
A: Somnia's performance comes from:
* Accelerated Sequential Execution - Through compiled EVM bytecode that achieves execution speeds close to hand-written C++ contracts.
* IceDB - A custom database with 15-100 nanosecond read/write operations and built-in snapshotting.
* MultiStream Consensus - A proof-of-stake BFT protocol inspired by Autobahn BFT that decouples data production from consensus.
* Advanced Compression Techniques - Streaming compression and BLS signature aggregation for massive transaction throughput
</details>
#### Network Limits and Performance
<details>
<summary>Q: What are the transaction throughput limits on Somnia?</summary>
A: Somnia Network is designed to handle over 1,000,000 transactions per second (TPS) with sub-second finality. The network can process up to 1 million ERC-20 swaps per second.
</details>
<details>
<summary>Q: What are the gas limits and fees on Somnia?</summary>
A: Somnia uses a dynamic gas fee model with the following characteristics:
* Minimum Gas: 21,000 gas for basic transactions (same as Ethereum)
* Base Fee: Dynamically adjusted based on block execution time
* Volume Discounts: Available for high-volume users
* Validator Adjustable: Base fees can be adjusted by validators
* Payment Token: Fees are paid in STT for testnet and SOMI for mainnet
For more details on Somnia gas model, check [here](https://docs.somnia.network/developer/somnia-gas-differences-to-ethereum)
</details>
<details>
<summary>Q: Are there any block size or transaction limits?</summary>
A: Somnia uses advanced compression techniques to optimize block space:
* Transaction Compression: Advanced algorithms to reduce transaction data size
* Efficient Processing: Optimized to handle millions of transactions without bottlenecks
* No Artificial Limits: The network is built to scale with demand
</details>
<details>
<summary>Q: What are the validator requirements and limits?</summary>
A: To become a Somnia validator, you must meet these requirements:
* Staking Requirement: 5,000,000 SOMI tokens minimum.
* Slashing Risk: Validators are subject to slashing for malicious behavior.
</details>
<details>
<summary>Q: Are there API rate limits for developers?</summary>
A: While specific API rate limits aren't publicly documented, Somnia provides:
* **Standard JSON-RPC APIs:** Following **Somnia compatibility standards**
* WebSocket Support: For real-time data streaming.
</details>
<details>
<summary>Q: What are the theoretical performance limits?</summary>
* **TPS Capacity**: Over 1,000,000 transactions per second.
* **Finality Time**: Sub-second transaction finality.
* **DPS Performance**: Capable of handling high-volume decentralized exchange operations.
* **Scalability**: Built to serve millions of concurrent users.
* **Compression Efficiency**: Advanced techniques to maximize throughput
\
\
**For More Details**: Check the complete performance analysis and comparisons with other blockchains [here](https://docs.somnia.network/litepaper/problem#the-current-state)
</details>
#### Security and Best Practices
<details>
<summary>Q: What security measures should developers implement?</summary>
A:
* Smart Contract Audits: Have contracts reviewed by security experts
* Testing: Comprehensive unit and integration testing
* Access Controls: Implement proper permission systems
* Upgrade Patterns: Use secure upgrade mechanisms
* Input Validation: Validate all user inputs
* Reentrancy Protection: Prevent reentrancy attacks
</details>
<details>
<summary>Q: How do I monitor my applications on Somnia?</summary>
A: Use:
* [Block Explorers](https://explorer.somnia.network/): View transactions and contract interactions
* Monitoring Tools: Set up alerts for important events
* Logging: Implement comprehensive application logging
* Analytics: Track usage patterns and performance metrics
</details>
<details>
<summary>Q: What are the network endpoints for Somnia?</summary>
A: Network configuration details including RPC endpoints, chain IDs, and other connection parameters can be found in the official documentation at <https://docs.somnia.network/get-started/connect-your-wallet-to-mainnet>
</details>
<details>
<summary>Q: How do I contribute to the Somnia ecosystem?</summary>
A:
* Build Applications: Create dApps that leverage Somnia's capabilities
* Community Participation: Join Discord and contribute to discussions
* Documentation: Help improve developer resources
* Bug Reports: Report issues through official channels
* Open Source: Contribute to open-source tools and libraries
</details>
This FAQ is regularly updated with the latest information about Somnia Network. For the most current technical details, always refer to the official Somnia documentation at <https://docs.somnia.network/>
{% hint style="success" %}
Congratulations, you have successfully mastered the fundamentals of Somnia Network! 🎉
{% endhint %}
# Developer FAQs
Welcome to the **Somnia Network Developer FAQ**! This guide is designed for developers building on Somnia's high-performance EVM-compatible blockchain. It covers environment setup, smart contract development, network configuration, APIs, optimization, testing, advanced features, troubleshooting, and resources.
***
## Development Environment Setup
#### Getting Started
<details>
<summary><strong>Q: What development tools are compatible with Somnia?</strong></summary>
A: Somnia is fully EVM-compatible, so you can use all standard EVM development tools:
* **Hardhat**: Most popular framework for smart contract development
* **Foundry**: Fast, portable toolkit written in Rust
* **Remix IDE**: Browser-based development environment
* **Truffle**: Comprehensive development suite
* **Brownie**: Python-based development framework
Simply configure these tools to connect to Somnia's network endpoints.
</details>
<details>
<summary><strong>Q: How do I configure my development environment for Somnia?</strong></summary>
A: Add Somnia network configuration to your project.
For Hardhat ([hardhat.config.js](https://docs.somnia.network/developer/how-to-guides/basics/deploy-and-verify-a-smart-contract-on-somnia-using-hardhat)):
For Foundry ([foundry.toml](https://docs.somnia.network/developer/how-to-guides/basics/deploy-a-smart-contract-on-somnia-testnet-using-foundry)):
</details>
{% stepper %}
{% step %}
**How do I get test tokens for development?**
To obtain **Somnia Test Tokens (STT)** for development:
1. Discord Method:
* Join the Somnia Discord server
* Go to the #dev-chat channel
* Tag @emreyeth (Somnia DevRel)
* Request test tokens with your wallet address
2. Email Method:
* Email <developers@somnia.foundation>
* Include your project description and GitHub profile
* Provide your testnet wallet address\\
3. Google cloud web3 faucet [here](https://cloud.google.com/application/web3/faucet/somnia/shannon)
4. Telegram Method:
* Join the [Somnia Developer Telegram](https://t.me/+s_oRMnGpOyQ3ODQ0) channel.
* Tag @emreyeth (Somnia DevRel)
* Request test tokens with your wallet address<br>
{% endstep %}
{% endstepper %}
<details>
<summary><strong>Q: What are the network parameters for Somnia?</strong></summary>
A: Key network information:
Testnet:
* **Chain ID**: 50312
* **RPC URL**: <https://dream-rpc.somnia.network>
* **Block Explorer**: <https://shannon-explorer.somnia.network/>
* **Currency**: STT (Somnia Test Token)
Mainnet:
* **Chain ID**: 5031
* **RPC URL**: <https://api.infra.mainnet.somnia.network>
* **Block Explorer**: <https://explorer.somnia.network/>
* **Currency**: SOMI (Somnia Token)
Alternatively you can check out <https://chainlist.org/> for other RPC options.
</details>
***
## Smart Contract Development
#### Contract Deployment
<details>
<summary><strong>Q: How do I deploy smart contracts to Somnia?</strong></summary>
A: Deployment process is identical to EVM, you can deploy with:
* Hardhat
* Foundry
* Remix
</details>
<details>
<summary><strong>Q: Are there any differences in smart contract development for Somnia?</strong></summary>
A: Somnia is fully EVM-compatible, so:
* All Solidity features work identically
* Same gas mechanics and opcodes
* Compatible with OpenZeppelin libraries
* Standard deployment tools work
* Bonus: Much lower gas costs and faster execution
</details>
<details>
<summary><strong>Q: How do I verify contracts on Somnia?</strong></summary>
A: Contract verification process:
1. Via Block Explorer: Use the verification tab on Somnia Explorer
2. Via API Verification [here](https://thecrossangle.notion.site/Somnia-Explorer-Smart-Contract-Verification-2622a5298c5f80f79611db3071989e19)
</details>
#### Gas Optimization
<details>
<summary><strong>Q: How do gas fees work on Somnia?</strong></summary>
A: Somnia uses a dynamic gas fee model:
* Payment Token: Fees are paid in **SOMI** tokens on Mainnet and STT on Testnet
* Base Fee: Dynamically adjusted based on block execution time
* Minimum Gas: 21,000 gas for basic transactions
* Validator Rewards: 50% of gas fees go to validators
* Volume Discounts: Available for high-volume applications
Tip: Gas costs are significantly lower than Ethereum mainnet due to Somnia's optimized architecture, you can check out more on somnia gas model[ here](https://docs.somnia.network/developer/somnia-gas-differences-to-ethereum).
</details>
<details>
<summary><strong>Q: Should I optimize for gas on Somnia?</strong></summary>
A: While gas optimization is still good practice:
* Less Critical: Lower fees mean less pressure for extreme optimization
* Focus on Features: More room for feature-rich applications
* User Experience: Better UX with lower transaction costs
* Standard Practices: Still follow Solidity best practices
</details>
***
## Network Configuration
#### RPC Providers
<details>
<summary><strong>Q: What RPC providers are available for Somnia?</strong></summary>
A: Multiple RPC providers support Somnia:
Primary Providers:
* **Ankr**: Enterprise-grade RPC infrastructure
* **Stakely**: High-performance RPC services
* **Official**: Somnia's native RPC endpoints
Configuration example:
```javascript
// Multiple RPC endpoints for redundancy
const rpcUrls = [
"https://somnia-json-rpc.stakely.io",
"https://api.infra.mainnet.somnia.network",
"https://somnia-rpc.publicnode.com"
];
```
Check out [chainlist](https://chainlist.org/) for more RPC Endpoints
</details>
<details>
<summary><strong>Q: How do I configure MetaMask for Somnia?</strong></summary>
* This guide helps configure metamask for [Somnia Netwrok](https://docs.somnia.network/get-started/connect-your-wallet-to-mainnet)
</details>
***
## APIs and Integration
#### JSON-RPC APIs
<details>
<summary><strong>Q: What APIs does Somnia support?</strong></summary>
A: Somnia supports standard EVM JSON-RPC APIs:
Core Methods:
* **eth\_**\* methods: Used for blockchain-related operations, such as querying data, sending transactions, or interacting with smart contracts.
* **net\_**\* methods: Provide information about the network, such as its status or connected peers.
* **web3\_**\* methods: Offer details about the client, such as version or configuration.
* **debug\_**\* methods: Enable debugging features on supported nodes, often used for troubleshooting or advanced analysis.
For a complete method reference, see the [JSON-RPC API documentation](/developer/json-rpc-api).
</details>
<details>
<summary><strong>Q: Are there any API rate limits?</strong></summary>
* High Performance: Designed for enterprise-level usage
* Standard Limits: Follow typical JSON-RPC conventions
</details>
<details>
<summary><strong>Q: How do I integrate Somnia with my existing dApp?</strong></summary>
A: Integration is straightforward due to EVM compatibility.
Follow the viem setup on the [`docs`](https://docs.somnia.network/developer/how-to-guides/intermediate/how-to-connect-to-somnia-network-via-viem-library#how-to-use-viem)
</details>
***
## Performance and Optimization
#### Somnia's Architecture
<details>
<summary><strong>Q: What makes Somnia so fast?</strong></summary>
A: Somnia achieves 1M+ TPS through four key innovations:
1. Accelerated Sequential Execution: Compiled EVM bytecode translates to highly optimized native code.
2. IceDB: Ultra-fast database with 15-100 nanosecond read/write operations and built-in snapshotting.
3. MultiStream Consensus: Proof-of-stake BFT protocol that decouples data production from consensus, enabling parallel processing.
4. Advanced Compression: Streaming compression and BLS signature aggregation for high compression ratios.
Learn more [here.](https://docs.somnia.network/concepts/somnia-blockchain/overview)
</details>
<details>
<summary><strong>Q: What are the performance details I should be aware of?</strong></summary>
* TPS Capacity: 1,000,000+ transactions per second
* Finality Time: Sub-second transaction finality
* DEX Performance: 1 million swaps per second
* Concurrent Users: Designed for millions of users
* Block Time: Optimized for real-time applications
</details>
***
## Testing and Deployment
#### Testing Strategies
<details>
<summary><strong>Q: How do I test my contracts on Somnia?</strong></summary>
A: Use standard testing frameworks with Somnia configuration.
Hardhat Testing:
```javascript
// test/Contract.test.js
const { expect } = require("chai");
const { ethers } = require("hardhat");
describe("Contract", function () {
let contract;
beforeEach(async function () {
const Contract = await ethers.getContractFactory("YourContract");
contract = await Contract.deploy();
await contract.deployed();
});
it("Should work on Somnia", async function () {
// Test your contract logic
expect(await contract.someFunction()).to.equal(expectedValue);
});
});
```
Foundry Testing:
```solidity
// test/Contract.t.sol
pragma solidity ^0.8.0;
import "forge-std/Test.sol";
import "../src/Contract.sol";
contract ContractTest is Test {
Contract public contractInstance;
function setUp() public {
contractInstance = new Contract();
}
function testSomniaCompatibility() public {
// Test contract functionality
assertEq(contractInstance.getValue(), expectedValue);
}
}
```
</details>
<details>
<summary><strong>Q: What should I test specifically for Somnia?</strong></summary>
A: Focus on these areas:
* Gas Usage: Verify lower gas consumption
* Performance: Test high-프로젝트로 돌아가기