# 클레이튼 sdk 로 이벤트 로그 어떻게 가져 오면 좋을가요?어디 에이피아이 참조하면 좋을까요?

**URL:** <https://devforum.kaia.io/t/sdk/2636>\
**Category:** Kaia Wallet\
**Created:** [12월 2, 2021, 12:57오후 UTC](https://devforum.kaia.io/t/sdk/2636 "2021-12-02T12:57:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@tim](https://devforum.kaia.io/u/tim)\
**Post date:** [12월 2, 2021, 12:57오후 UTC](https://devforum.kaia.io/t/sdk/2636/1 "2021-12-02T12:57:46Z")

</div>

안녕하세요  
클레이튼에서 java sdk 기반으로 트렌젝션 리십트의 이벤트 로그를 가져오려고합니다.

| | | TransactionReceiptData data=cavercaver.rpc.klay.getTransactionReceipt(txhahs).send().getResult(); |
| --- | --- | --- |
| | | List logs=data.getLogs(); |

해당 로그를 클레이 스코프로 보는 이벤트 로그 포멧으로 변환하고싶은데  
어딜 참조해야 할지 알려주시면 고맙겠습니다.

---

<div class="post-metadata">

**Author:** ![Kale](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/kale/32/148_2.png) [@Kale](https://devforum.kaia.io/u/Kale)\
**Post date:** [12월 3, 2021, 1:59오전 UTC](https://devforum.kaia.io/t/sdk/2636/2 "2021-12-03T01:59:29Z")

</div>

안녕하세요.

caver-java의 ABI.decodeLog() 함수를 참고부탁드립니다.

해당함수는 Log를 디코딩하기위한 Event의 파라미터 정보가 필요합니다. 아래 코드 예시 참고바랍니다.

```auto
//Contract 인스턴스내 저장된 ContractEvent의 객체를 이용하셔도 됩니다.
List<ContractIOType> ioTypeList= Arrays.asList(
                    new ContractIOType("from", "address", true),
                    new ContractIOType("to", "address", true),
                    new ContractIOType("value", "uint256", false)
            );

List<String> topics = Arrays.asList(
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x0000000000000000000000000000000000000000000000000000000000000000",
                    "0x0000000000000000000000002c8ad0ea2e0781db8b8c9242e07de3a5beabb71a"
);

String nonIndexedData = "0x00000000000000000000000000000000000000000000152d02c7e14af6800000";

BigInteger decimals = BigInteger.valueOf(18);
BigInteger value = BigInteger.valueOf(100_000).multiply(BigInteger.TEN.pow(decimals.intValue())); // 100000 * 10^18

EventValues eventValues = caver.abi.decodeLog(ioTypeList, nonIndexedData, topics);

```

감사합니다.

---

<div class="post-metadata">

**Author:** ![tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@tim](https://devforum.kaia.io/u/tim)\
**Post date:** [12월 6, 2021, 5:57오전 UTC](https://devforum.kaia.io/t/sdk/2636/3 "2021-12-06T05:57:04Z")

</div>

감사합니다~ 많은 참조가 되었습니다~
