# Klaytn 1.8.2 (baobab) upgrade 이후 caver.klay.getTransaction() 에서 ERROR

**URL:** <https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617>\
**Category:** Caver\
**Tags:** caver-js\
**Created:** [3월 30, 2022, 11:28오전 UTC](https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617 "2022-03-30T11:28:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![codetree](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/codetree/32/186_2.png) [@codetree](https://devforum.kaia.io/u/codetree)\
**Post date:** [3월 30, 2022, 11:28오전 UTC](https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617/1 "2022-03-30T11:28:14Z")

</div>

baobab node: klaytn1.8.2  
client: caver-js 1.3.1

```auto
caver.klay.getTransaction('0xa866a7a53dc03b5ca9cad883a9bad0b505c5092161e8bf412d23383280367b30');

```

에서

Error: [number-to-bn] while converting number undefined to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: undefined

ERROR가 발생합니다.  
caver-js 1.8.0 로 올려서 해도 동일합니다.

---

<div class="post-metadata">

**Author:** ![margintop3498](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/margintop3498/32/1750_2.png) [@margintop3498](https://devforum.kaia.io/u/margintop3498)\
**Post date:** [3월 30, 2022, 12:51오후 UTC](https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617/2 "2022-03-30T12:51:43Z")

</div>

안녕하세요

caver-js에서 해당 트랜잭션을 파싱하는중 이슈가 있는것같습니다.

다른 트랜잭션은 정상적으로 가져올 수 있는것을 확인했습니다.

일단은 고쳐지기 전까지 아래와 같은 방법으로 Endpoint Node로 직접 요청을 보내실 수 있습니다.

## Request

```auto
const body = {"jsonrpc":"2.0","id":1,"method":"klay_getTransactionByHash","params":["0xa866a7a53dc03b5ca9cad883a9bad0b505c5092161e8bf412d23383280367b30"]};

fetch("https://public-node-api.klaytnapi.com/v1/baobab", {
  method: 'POST',
  body: JSON.stringify(body),
});

```

## Response

```auto
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "accessList": [],
    "blockHash": "0x832f2bf7b1e413c8d0d9069bd8a17479676a5dcf12a2868962fce6166ab818e9",
    "blockNumber": "0x5281bab",
    "chainId": "0x3e9",
    "from": "0x621a1507f654c9d3435e9e5ad0bbda6a5a22aca8",
    "gas": "0xc350",
    "hash": "0xa866a7a53dc03b5ca9cad883a9bad0b505c5092161e8bf412d23383280367b30",
    "input": "0x",
    "maxFeePerGas": "0xae9f7bcc00",
    "maxPriorityFeePerGas": "0xae9f7bcc00",
    "nonce": "0x38f5",
    "senderTxHash": "0xa866a7a53dc03b5ca9cad883a9bad0b505c5092161e8bf412d23383280367b30",
    "signatures": [
      {
        "R": "0xae41fac00e27cac1c2d7c3107e3868473ddd9c7eddb03d77f4653144ade9dfcd",
        "S": "0x546f293e9fe54b611573e56456307c380ac957715b8f8e5d9f2a0373ec902d00",
        "V": "0x1"
      }
    ],
    "to": "0x72172dd13dc75478cd54a972ede14e7f56210692",
    "transactionIndex": "0x0",
    "type": "TxTypeEthereumDynamicFee",
    "typeInt": 30722,
    "value": "0xde0b6b3a7640000"
  }
}

```

---

<div class="post-metadata">

**Author:** ![codetree](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/codetree/32/186_2.png) [@codetree](https://devforum.kaia.io/u/codetree)\
**Post date:** [3월 31, 2022, 2:26오전 UTC](https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617/3 "2022-03-31T02:26:52Z")

</div>

네 저도 caver-js 의 fomatters.js에서  
Ethereum Dynamic Fee Type 인경우  
gasPrice 없는데 포멧 변환을 하다 발생한 오류 라는 것은 알고 있습니다.  
언제 patch가 될까요?

---

<div class="post-metadata">

**Author:** ![margintop3498](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/margintop3498/32/1750_2.png) [@margintop3498](https://devforum.kaia.io/u/margintop3498)\
**Post date:** [3월 31, 2022, 4:30오전 UTC](https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617/4 "2022-03-31T04:30:45Z")

</div>

일단 기다리셔야겠죠?

급하시면 caver-js를 패치하여 PR을 보내보시는것을 추천드립니다.

아래 공식 레포 주소입니다.

> **[GitHub - klaytn/caver-js: Official caver-js repository](https://github.com/klaytn/caver-js)**
>
> Official caver-js repository. Contribute to klaytn/caver-js development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![codetree](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/codetree/32/186_2.png) [@codetree](https://devforum.kaia.io/u/codetree)\
**Post date:** [3월 31, 2022, 7:29오전 UTC](https://devforum.kaia.io/t/klaytn-1-8-2-baobab-upgrade-caver-klay-gettransaction-error/4617/5 "2022-03-31T07:29:30Z")

</div>

> <https://github.com/klaytn/caver-js/pull/638>
>
> Fix when there is no gasPrice (case DynamicFee tx)
> 
> \[Test code\]
> \`\`\`
> const Ca…ver = require('caver-js');
> caver = new Caver("https://public-node-api.klaytnapi.com/v1/baobab");
> const result\_packet = caver.klay.getTransaction('0x9e54f37210a76bcf4317eb5bc22bbf8b9a16bd29b992fbb76f93724e2b593c50').then(console.log);
> \`\`\`
> result:
> \`{
> accessList: \[\],
> blockHash: '0xac115921eeac795ee76740d4a39d87e1d4a56f32aa227439eeab4944f89453bb',
> blockNumber: 86517670,
> chainId: '0x3e9',
> from: '0xC7645C1beF76DBfA721C8e2F3B561C705F9Ee0fd',
> gas: 50000,
> hash: '0x9e54f37210a76bcf4317eb5bc22bbf8b9a16bd29b992fbb76f93724e2b593c50',
> input: '0x',
> maxFeePerGas: '0xae9f7bcc00',
> maxPriorityFeePerGas: '0xae9f7bcc00',
> nonce: 2,
> senderTxHash: '0x9e54f37210a76bcf4317eb5bc22bbf8b9a16bd29b992fbb76f93724e2b593c50',
> signatures: \[
> {
> R: '0x7ce1823ea65cd2d15423781b84a37c2a7404e5c0aa064bc41ab7a574131763c3',
> S: '0x666abf83212376211b723652148ad652e4e683199b6af15b0150ca0f72fa1ad2',
> V: '0x0'
> }
> \],
> to: '0x85808859792dd720C8AeDdA9fe6B582F58122Dfb',
> transactionIndex: 0,
> type: 'TxTypeEthereumDynamicFee',
> typeInt: 30722,
> value: '300000000000000000000'
> }
> \`
> 
> \## Proposed changes
> 
> \- Describe your changes to communicate to the maintainers why we should accept this pull request.
> \- If it fixes a bug or resolves a feature request, be sure to link to that issue.
> 
> \## Types of changes
> 
> Please put an x in the boxes related to your change.
> 
> \- \[X\] Bugfix
> \- \[\] New feature or enhancement
> \- \[\] Others
> 
> \## Checklist
> 
> \*Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.\*
> 
> \- \[X\] I have read the \[CONTRIBUTING GUIDELINES\](https://github.com/klaytn/caver-js/blob/master/CONTRIBUTING.md) doc
> \- \[X\] I have signed the \[CLA\](https://cla-assistant.io/klaytn/caver-js)
> \- \[X\] Lint and unit tests pass locally with my changes
> \- \[X\] I have added tests that prove my fix is effective or that my feature works
> \- \[\] I have added necessary documentation (if appropriate)
> \- \[\] Any dependent changes have been merged and published in downstream modules
> 
> \## Related issues
> 
> \- Please leave the issue numbers or links related to this PR here.
> 
> \## Further comments
> 
> If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

PR 요청 했습니다.
