> For the complete documentation index, see [llms.txt](https://whs3-doge5k.gitbook.io/smartcontract-security-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whs3-doge5k.gitbook.io/smartcontract-security-docs/basics/4./undefined-1.md).

# 트랜잭션 객체의 이해

트랜잭션 객체에는 트랜잭션과 관련된 다양한 정보가 포함되어 있다. 트랜잭션은 한 번 블록에 포함되면 변경할 수 없기 때문에, 누구나 해당 트랜잭션의 정보를 자유롭게 조회할 수 있다. 아래는 트랜잭션 객체에 담긴 정보 중 일부를 소개한 것이다.

<figure><img src="https://2462457462-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLf9vwRuaws92ULgGvzTi%2Fuploads%2F4NsakXjUsMAd6CRHf3vB%2Fimage.png?alt=media&amp;token=6917074c-9214-44e5-b890-c146e072bd0e" alt=""><figcaption></figcaption></figure>

#### **blockHash**

* 해당 트랜잭션이 들어간 블록의 해시 값
* 블록의 헤더 전체를 해시화한 값이며, 블록 생성이 완료되면 변하지 않음

#### **blockNumber**

* 트랜잭션이 포함된 블록의 번호

#### **from**

* 트랜잭션을 보낸 EOA

#### **transactionIndex**

* 해당 블록 내의 트랜잭션의 위치 인덱스(0부터 시작)

#### **effectiveGasPrice**

* 트랜잭션을 처리하는데에 적용된 gas price 단위
* 기준: base fee + max priority fee

#### **accessList**

* 해당 트랜잭션이 접근할 정보를 미리 명시해 놓는 기능
* 가스 절감 효과
* 기본 설정은 빈 배열

#### **chainId**

* 트랜잭션이 발생한 체인
* 11155111은 Sepolia

#### **gasLimit**

* 해당 트랜잭션에 설정된 최대 gas 사용량
* JSON-RPC API의 eth\_estimateGas 함수에서 트랜잭션을 시뮬레이션하여 필요한 가스를 추정

#### **hash**

* Transaction Hash
* 각 트랜잭션마다 가지고 있는 고유 값

#### **Input**

* ABI(Application Binary Interface) 인코딩한 인자 값
* EVM이 이해할 수 있는 바이너리 코드로 변환됨

#### **maxFeePerGas**

* EIP-1559에서 설정한 최대 gas 가격
* 지불 가능한 최대 가스비

#### **maxPriorityFeePerGas**

* proposer에게 주는 팁

#### **nonce**

* EOA의 nonce 값
* EOA의 nonce와 트랜잭션의 nonce가 일치할 때 해당 트랜잭션은 유효

#### **r,s,yParity**

* ECDSA(타원 곡선 디지털 서명 알고리즘)의 서명 값
* v는 서명의 x 좌표
* s는 서명의 계산 결과 값
* 트랜잭션 타입이 새로 도입될 때마다 v에 여러 의미가 담기게 되면서, 간단 yParity로 대체
* yParity는 y좌표의 부호 정보만 담음

#### **type**

* 트랜잭션 타입(2 = EIP-1559 트랜잭션)
  * EIP-1559: 이더리움 트랜잭션 수수료 책정 방식을 개선하기 위해 도입된 제안

#### **value**

* 전송한 이더 단위(wei)

[<mark style="background-color:blue;">출처</mark>](https://ethereum.org/en/developers/docs/transactions/#whats-a-transaction)
