메인 콘텐츠로 건너뛰기

Documentation Index

Fetch the complete documentation index at: https://docs.stablenet.network/llms.txt

Use this file to discover all available pages before exploring further.

StableNet은 모든 표준 이더리움 트랜잭션 타입과 수수료 위임을 위한 StableNet 네이티브 타입을 지원합니다.

지원 타입

타입EIP설명
Legacy0x00EIP-2718 이전 형식. 본문에 chain ID 없음.
Access List0x01EIP-2930chainIdaccessList로 접근 스토리지 슬롯 사전 선언.
Dynamic Fee0x02EIP-1559maxFeePerGasmaxPriorityFeePerGas 사용. 새 트랜잭션에 권장.
Blob0x03EIP-4844데이터 가용성 트랜잭션. StableNet에서 미지원 (blob 옵코드 제외).
Set Code0x04EIP-7702코드 위임.
Fee Delegated0x16StableNet별도 수수료 지불자가 가스 비용을 부담하는 이중 서명 트랜잭션.

타입 0x02 — Dynamic Fee (권장)

대부분의 사용 사례에서 권장되는 표준 트랜잭션 타입입니다. 두 수수료 필드를 모두 설정해야 합니다.
{
  type: 2,
  chainId: 8283,
  nonce: 1,
  to: "0xRecipient",
  value: "0xDE0B6B3A7640000",   // 1 WKRC
  gas: "0x5208",                  // 21000
  maxFeePerGas: "0x1286AE6000",  // 80000 Gwei
  maxPriorityFeePerGas: "0x1919B00000", // 27600 Gwei
  data: "0x",
  accessList: []
}

타입 0x16 — Fee Delegated (StableNet 네이티브)

feePayer 필드와 두 번째 서명(fv, fr, fs)을 추가합니다. 수수료 지불자가 가스를 납부하고, 발신자는 전송 가치만 납부합니다.
{
  type: 0x16,
  chainId: 8283,
  nonce: 1,
  to: "0xRecipient",
  value: "0xDE0B6B3A7640000",
  gas: "0x76C0",
  maxFeePerGas: "0x1286AE6000",
  maxPriorityFeePerGas: "0x1919B00000",
  feePayer: "0xFeePayerAddress",
  input: "0x",
  accessList: [],
  // 발신자 서명
  v: "0x0", r: "0x...", s: "0x...",
  // 수수료 지불자 서명
  fv: "0x0", fr: "0x...", fs: "0x..."
}
요건:
  • Applepie 포크가 활성화되어야 함
  • 브로드캐스트 전에 두 서명 모두 필요
  • tx.origin은 항상 발신자 (수수료 지불자는 컨트랙트 실행에서 보이지 않음)

ethers.js에서 서명

// 타입 0x02
const tx = await wallet.sendTransaction({
  to: recipient,
  value: ethers.parseEther("1.0"),
  maxPriorityFeePerGas: ethers.parseUnits("27600", "gwei"),
  maxFeePerGas: ethers.parseUnits("80000", "gwei"),
});

// 타입 0x16 — 전체 흐름은 수수료 위임 튜토리얼 참조

관련 문서