네트워크 설정 가이드
네트워크 정보
| 항목 | 값 |
|---|---|
| Network Name | FlutterDev Private Chain |
| Chain ID | 3151908 (0x301824) |
| RPC URL | https://rpc.flutterdev.online |
| Currency | ETH |
| Block Time | ~2 seconds |
| Consensus | Proof of Stake |
| Validators | 2 |
RPC 엔드포인트
HTTPS (권장)
https://rpc.flutterdev.online내부 Docker 네트워크
http://el-1-geth-lighthouse:8545Docker 네트워크 이름: kt-howling-swamp
MetaMask 설정
자동 추가 (권장)
아래 JavaScript를 브라우저 콘솔에서 실행:
javascript
await ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x301824',
chainName: 'FlutterDev Private Chain',
nativeCurrency: {
name: 'Ether',
symbol: 'ETH',
decimals: 18
},
rpcUrls: ['https://rpc.flutterdev.online'],
blockExplorerUrls: ['https://scan.flutterdev.online']
}]
});수동 추가
- MetaMask 열기
- 네트워크 드롭다운 클릭
- "네트워크 추가" 클릭
- 다음 정보 입력:
- 네트워크 이름:
FlutterDev Private Chain - 새 RPC URL:
https://rpc.flutterdev.online - 체인 ID:
3151908 - 통화 기호:
ETH - 블록 탐색기 URL:
https://scan.flutterdev.online
- 네트워크 이름:
Hardhat 설정
hardhat.config.js:
javascript
module.exports = {
networks: {
flutterdev: {
url: "https://rpc.flutterdev.online",
chainId: 3151908,
accounts: ["YOUR_PRIVATE_KEY"]
}
}
};Foundry 설정
bash
# 컨트랙트 배포
forge create --rpc-url https://rpc.flutterdev.online \
--private-key YOUR_PRIVATE_KEY \
src/MyContract.sol:MyContract
# 스크립트 실행
forge script script/Deploy.s.sol \
--rpc-url https://rpc.flutterdev.online \
--private-key YOUR_PRIVATE_KEY \
--broadcastethers.js 연결
javascript
const { ethers } = require('ethers');
const provider = new ethers.JsonRpcProvider('https://rpc.flutterdev.online');
// 블록 번호 확인
const blockNumber = await provider.getBlockNumber();
console.log('Current block:', blockNumber);
// 잔액 확인
const balance = await provider.getBalance('0x...');
console.log('Balance:', ethers.formatEther(balance), 'ETH');web3.js 연결
javascript
const Web3 = require('web3');
const web3 = new Web3('https://rpc.flutterdev.online');
// 블록 번호 확인
const blockNumber = await web3.eth.getBlockNumber();
console.log('Current block:', blockNumber);curl로 RPC 테스트
bash
# Chain ID 확인
curl -X POST https://rpc.flutterdev.online \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# 블록 번호 확인
curl -X POST https://rpc.flutterdev.online \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
# 잔액 확인
curl -X POST https://rpc.flutterdev.online \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x...", "latest"],"id":1}'Kurtosis 네트워크 관리
현재 상태 확인
bash
kurtosis enclave ls
kurtosis enclave inspect kt-howling-swamp서비스 로그 확인
bash
# Execution Layer (Geth)
kurtosis service logs kt-howling-swamp el-1-geth-lighthouse -f
# Consensus Layer (Lighthouse)
kurtosis service logs kt-howling-swamp cl-1-lighthouse-geth -f네트워크 재시작
bash
# 중지
kurtosis enclave stop kt-howling-swamp
# 시작
kurtosis enclave start kt-howling-swamp
# 완전 삭제 후 재생성
kurtosis enclave rm kt-howling-swamp
kurtosis run github.com/ethpandaops/ethereum-package --args-file /home/blockchain/network_params.yaml