가스 가격 책정 참조
Stable에서의 트랜잭션 구성, 가스 추정, 도구 설정.
트랜잭션 구성
Stable에서 트랜잭션을 구성할 때 maxPriorityFeePerGas를 0으로 설정하세요. 클라이언트는 가장 최근 블록에서 최신 기본 수수료(base fee)를 가져와야 하며, maxFeePerGas를 계산할 때 안전 마진을 포함해야 합니다.
// ethers.js v6
const block = await provider.getBlock("latest");
const baseFee = block.baseFeePerGas;
const maxPriorityFeePerGas = 0n; // always 0 on Stable
const maxFeePerGas = baseFee * 2n + maxPriorityFeePerGas; // double the base fee as safety margin
const tx = await wallet.sendTransaction({
to: "0xRecipientAddress",
value: parseEther("0.01"),
maxFeePerGas,
maxPriorityFeePerGas,
});Native USDT0 transfer confirmed. Fee ≈ 0.0000021 USDT0 at baseFee = 1 gwei.가스 추정
이더리움에서와 마찬가지로 eth_estimateGas와 eth_gasPrice를 사용하세요. 주요 차이점은 eth_maxPriorityFeePerGas가 항상 0을 반환한다는 것입니다.
const gasPrice = await provider.send("eth_gasPrice", []);
const gasEstimate = await provider.estimateGas({
to: contractAddress,
data: callData,
});
const estimatedFeeInUSDT0 = gasPrice * gasEstimate;도구 설정
- Hardhat / Foundry: 특별한 설정이 필요 없습니다. 표준 EVM 설정으로 작동합니다. 설정에서 우선순위 수수료를 명시적으로 지정하는 경우
0으로 설정하세요. - 지갑: 우선순위 팁 입력 필드를 숨기거나 비활성화하세요. 이 값은 효과가 없으므로 표시하면 사용자에게 혼란을 줄 수 있습니다.
- 모니터링: 수수료 분석 대시보드는 우선순위 수수료를 추적하지 않아야 합니다. 항상 0이 됩니다.
다음 추천
- 가스 가격 책정 개념 — Stable이 단일 구성 요소 수수료 모델을 사용하는 이유를 이해하세요.
- 이더리움 비교 — 이더리움에서 포팅할 때 마주치게 될 모든 동작 차이를 검토하세요.
- JSON-RPC API — Stable이 노출하는
eth_*메서드를 참조하세요.

