# 메타마스크에서 클레이튼 트랜잭션 생성

**URL:** <https://devforum.kaia.io/t/topic/4398>\
**Category:** Kaia\
**Tags:** caver-js, klaytn\
**Created:** [3월 16, 2022, 9:32오전 UTC](https://devforum.kaia.io/t/topic/4398 "2022-03-16T09:32:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sky300z](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/sky300z/32/1925_2.png) [@sky300z](https://devforum.kaia.io/u/sky300z)\
**Post date:** [3월 16, 2022, 9:32오전 UTC](https://devforum.kaia.io/t/topic/4398/1 "2022-03-16T09:32:21Z")

</div>

안녕하세요 !

먼저 항상 친절하고 빠른 답변 감사합니다.  
클레이튼 트랜잭션 생성 작업 중에 질문이 있어 문의드립니다.

제가 아는 방법으로는 caver.js를 이용하여 트랜잭션을 발생시키는 것으로 알고 있는데요, 이때 메타마스크를 이용하여 트랜잭션을 생성하는 방법이 있는지 질문드립니다. (caver가 아니어도 됩니다.)

- 공식 문서에 따르면 메타마스크에 클레이튼 등록하는 것은 찾았으나 위 문의 사항에 대한 것을 찾지 못하여 질문드립니다. 🙂  
[https://docs.klaytn.com/dapp/tutorials/connecting-metamask](https://docs.klaytn.com/dapp/tutorials/connecting-metamask)

---

<div class="post-metadata">

**Author:** ![gyunwoo0](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/gyunwoo0/32/2129_2.png) [@gyunwoo0](https://devforum.kaia.io/u/gyunwoo0)\
**Post date:** [3월 16, 2022, 9:43오전 UTC](https://devforum.kaia.io/t/topic/4398/2 "2022-03-16T09:43:08Z")

</div>

저도 그게 궁금해서 헤맸는데,  
메타마스크 네트워크 baobab으로 놓고,  
Web3(window.ethereum) 으로 프로바이더 생성하고 실행하니까 트랜잭션 생성 되네요.  
최근 업그레이드인 것 같아요.

> **[Toward Ethereum Equivalence #3 — Ethereum API 형식 지원](https://medium.com/klaytn-kr/toward-ethereum-equivalence-3-supporting-ethereum-apis-kr-625da4a30dfa)**
>
> 클레이튼 v1.8.0부터 eth namespace(\`eth\_\`) API가 이더리움 API와 동일한 포맷을 지원하도록 변경됩니다. 이 포스팅은 API 사용자들이 이더리움 API 지원의 목적을 이해하고 상황 별로 적절한 대응을 할 수 있도록 유의해야…

---

<div class="post-metadata">

**Author:** ![c4ei](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/c4ei/32/1021_2.png) [@c4ei](https://devforum.kaia.io/u/c4ei)\
**Post date:** [3월 16, 2022, 7:55오후 UTC](https://devforum.kaia.io/t/topic/4398/3 "2022-03-16T19:55:27Z")

</div>

yarn add caver-js 해야 하나요? 아니면 web3 로 그냥 똑같이 해도 되는지 궁금합니다.

혹시나 해서 연결해보니 메서드가 없는지 저는 잘 안되는 듯 해서요.

inpage.js:1 MetaMask - RPC Error: The method “klay\_gasPrice” does not exist / is not available. {code: -32601, message: ‘The method “klay\_gasPrice” does not exist / is not available.’, data: {…}}code: -32601data: {origin: ‘[http://localhost:4001](http://localhost:4001)’}message: “The method “klay\_gasPrice” does not exist / is not available.”[[Prototype]]: Objectconstructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf() **defineGetter** : ƒ **defineGetter** () **defineSetter** : ƒ **defineSetter** () **lookupGetter** : ƒ **lookupGetter** () **lookupSetter** : ƒ **lookupSetter** () **proto** : (…)get **proto** : ƒ **proto** ()set **proto** : ƒ **proto** ()  
(익명) @ inpage.js:1  
(익명) @ inpage.js:17  
\_runReturnHandlers @ inpage.js:17  
\_processRequest @ inpage.js:17  
await in \_processRequest(비동기)  
\_handle @ inpage.js:17  
handle @ inpage.js:17  
\_rpcRequest @ inpage.js:1  
sendAsync @ inpage.js:1  
(익명) @ index.js:132  
push…/node\_modules/caver-js/packages/caver-core-requestmanager/src/index.js.RequestManager.send @ index.js:125  
(익명) @ index.js:445  
(익명) @ index.js:460  
(익명) @ index.js:470  
\_executeMethod @ index.js:1723  
await in \_executeMethod(비동기)  
sendEthByMeta @ App.js:133  
await in sendEthByMeta(비동기)  
startDraw @ App.js:193  
callCallback @ react-dom.development.js:3945  
invokeGuardedCallbackDev @ react-dom.development.js:3994  
invokeGuardedCallback @ react-dom.development.js:4056  
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070  
executeDispatch @ react-dom.development.js:8243  
processDispatchQueueItemsInOrder @ react-dom.development.js:8275  
processDispatchQueue @ react-dom.development.js:8288  
dispatchEventsForPlugins @ react-dom.development.js:8299  
(익명) @ react-dom.development.js:8508  
batchedEventUpdates$1 @ react-dom.development.js:22396  
batchedEventUpdates @ react-dom.development.js:3745  
dispatchEventForPluginEventSystem @ react-dom.development.js:8507  
attemptToDispatchEvent @ react-dom.development.js:6005  
dispatchEvent @ react-dom.development.js:5924  
unstable\_runWithPriority @ scheduler.development.js:468  
runWithPriority$1 @ react-dom.development.js:11276  
discreteUpdates$1 @ react-dom.development.js:22413  
discreteUpdates @ react-dom.development.js:3756  
dispatchDiscreteEvent @ react-dom.development.js:5889  
index.js:59 Uncaught (in promise) Error: The method “klay\_gasPrice” does not exist / is not available.  
{  
“origin”: “[http://localhost:4001](http://localhost:4001)”  
}  
at Object.\_fireError (index.js:59:1)  
at index.js:256:1  
at index.js:151:1  
at s.\_handle (inpage.js:17:2422)  
\_fireError @ index.js:59  
(익명) @ index.js:256  
(익명) @ index.js:151  
\_handle @ inpage.js:17  
setTimeout(비동기)  
\_fireError @ index.js:72  
(익명) @ index.js:256  
(익명) @ index.js:151  
\_handle @ inpage.js:17  
await in \_handle(비동기)  
handle @ inpage.js:17  
\_rpcRequest @ inpage.js:1  
sendAsync @ inpage.js:1  
(익명) @ index.js:132  
push…/node\_modules/caver-js/packages/caver-core-requestmanager/src/index.js.RequestManager.send @ index.js:125  
(익명) @ index.js:445  
(익명) @ index.js:460  
(익명) @ index.js:470  
\_executeMethod @ index.js:1723  
await in \_executeMethod(비동기)  
sendEthByMeta @ App.js:133  
await in sendEthByMeta(비동기)  
startDraw @ App.js:193  
callCallback @ react-dom.development.js:3945  
invokeGuardedCallbackDev @ react-dom.development.js:3994  
invokeGuardedCallback @ react-dom.development.js:4056  
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070  
executeDispatch @ react-dom.development.js:8243  
processDispatchQueueItemsInOrder @ react-dom.development.js:8275  
processDispatchQueue @ react-dom.development.js:8288  
dispatchEventsForPlugins @ react-dom.development.js:8299  
(익명) @ react-dom.development.js:8508  
batchedEventUpdates$1 @ react-dom.development.js:22396  
batchedEventUpdates @ react-dom.development.js:3745  
dispatchEventForPluginEventSystem @ react-dom.development.js:8507  
attemptToDispatchEvent @ react-dom.development.js:6005  
dispatchEvent @ react-dom.development.js:5924  
unstable\_runWithPriority @ scheduler.development.js:468  
runWithPriority$1 @ react-dom.development.js:11276  
discreteUpdates$1 @ react-dom.development.js:22413  
discreteUpdates @ react-dom.development.js:3756  
dispatchDiscreteEvent @ react-dom.development.js:5889  
inpage.js:1 MetaMask - RPC Error: The method “klay\_sendTransaction” does not exist / is not available. {code: -32601, message: ‘The method “klay\_sendTransaction” does not exist / is not available.’, data: {…}}  
(익명) @ inpage.js:1  
(익명) @ inpage.js:17  
\_runReturnHandlers @ inpage.js:17  
\_processRequest @ inpage.js:17  
await in \_processRequest(비동기)  
\_handle @ inpage.js:17  
handle @ inpage.js:17  
\_rpcRequest @ inpage.js:1  
sendAsync @ inpage.js:1  
(익명) @ index.js:132  
push…/node\_modules/caver-js/packages/caver-core-requestmanager/src/index.js.RequestManager.send @ index.js:125  
(익명) @ index.js:445  
(익명) @ index.js:476  
\_fireError @ index.js:63  
(익명) @ index.js:256  
(익명) @ index.js:151  
\_handle @ inpage.js:17  
await in \_handle(비동기)  
handle @ inpage.js:17  
\_rpcRequest @ inpage.js:1  
sendAsync @ inpage.js:1  
(익명) @ index.js:132  
push…/node\_modules/caver-js/packages/caver-core-requestmanager/src/index.js.RequestManager.send @ index.js:125  
(익명) @ index.js:445  
(익명) @ index.js:460  
(익명) @ index.js:470  
\_executeMethod @ index.js:1723  
await in \_executeMethod(비동기)  
sendEthByMeta @ App.js:133  
await in sendEthByMeta(비동기)  
startDraw @ App.js:193  
callCallback @ react-dom.development.js:3945  
invokeGuardedCallbackDev @ react-dom.development.js:3994  
invokeGuardedCallback @ react-dom.development.js:4056  
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4070  
executeDispatch @ react-dom.development.js:8243  
processDispatchQueueItemsInOrder @ react-dom.development.js:8275  
processDispatchQueue @ react-dom.development.js:8288  
dispatchEventsForPlugins @ react-dom.development.js:8299  
(익명) @ react-dom.development.js:8508  
batchedEventUpdates$1 @ react-dom.development.js:22396  
batchedEventUpdates @ react-dom.development.js:3745  
dispatchEventForPluginEventSystem @ react-dom.development.js:8507  
attemptToDispatchEvent @ react-dom.development.js:6005  
dispatchEvent @ react-dom.development.js:5924  
unstable\_runWithPriority @ scheduler.development.js:468  
runWithPriority$1 @ react-dom.development.js:11276  
discreteUpdates$1 @ react-dom.development.js:22413  
discreteUpdates @ react-dom.development.js:3756  
dispatchDiscreteEvent @ react-dom.development.js:5889  
index.js:59 Uncaught (in promise) Error: The method “klay\_sendTransaction” does not exist / is not available.  
{

---

<div class="post-metadata">

**Author:** ![sky300z](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/sky300z/32/1925_2.png) [@sky300z](https://devforum.kaia.io/u/sky300z)\
**Post date:** [3월 17, 2022, 12:59오전 UTC](https://devforum.kaia.io/t/topic/4398/4 "2022-03-17T00:59:24Z")

</div>

진짜 최신 업데이트네요 찾기 어려웠는데 감사합니다 !

---

<div class="post-metadata">

**Author:** ![sky300z](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/sky300z/32/1925_2.png) [@sky300z](https://devforum.kaia.io/u/sky300z)\
**Post date:** [3월 17, 2022, 1:04오전 UTC](https://devforum.kaia.io/t/topic/4398/5 "2022-03-17T01:04:35Z")

</div>

js에서 caver 메소드 사용하실 때 npm으로 받으셔야 사용가능한 것으로 알고 있습니다 !

> **[개발 도구 설치하기](https://ko.docs.klaytn.com/getting-started/quick-start/install-development-tools)**

공식문서에는 yarn이 없는 것 같네요? 이 부분은 좀 더 찾아봐야 할 것 같습니다.

---

<div class="post-metadata">

**Author:** ![c4ei](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/c4ei/32/1021_2.png) [@c4ei](https://devforum.kaia.io/u/c4ei)\
**Post date:** [3월 17, 2022, 7:56오전 UTC](https://devforum.kaia.io/t/topic/4398/6 "2022-03-17T07:56:04Z")

</div>

감사합니다.  
덕분에  
[lotto.c4ei.net](http://lotto.c4ei.net) 가 게임돌리는 쪽만 간단하게 구현은 되었습니다

이건 [c4ei.net](https://lotto.c4ei.net/help.html) 설명입니다.

ceik 토큰도 구현해보고 싶은데 해봐야겠습니다  
코로나 조심하세요.

---

<div class="post-metadata">

**Author:** ![delbert\_park](https://avatars.discourse-cdn.com/v4/letter/d/e480ec/32.png) [@delbert\_park](https://devforum.kaia.io/u/delbert_park)\
**Post date:** [3월 17, 2022, 12:34오후 UTC](https://devforum.kaia.io/t/topic/4398/7 "2022-03-17T12:34:42Z")

</div>

안녕하세요. metamask로 클레이튼에 트랜잭션을 보내려고 하는데 잘 되고 있지 않습니다.  
메타마스크 baobab 세팅 후  
web3에 ethereum줬지만 아래와 같은 에러와 함께 계속 실패합니다.  
metaMask - RPC Error: [ethjs-query] while formatting outputs from RPC '{“value”:{“code”:-32603,“data”:{“code”:-32000,“message”:“transaction type not supported”}}

코드와 버전좀 공유해주실 수 있을까요?

---

<div class="post-metadata">

**Author:** ![Denver](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/denver/32/557_2.png) [@Denver](https://devforum.kaia.io/u/Denver)\
**Post date:** [3월 17, 2022, 11:51오후 UTC](https://devforum.kaia.io/t/topic/4398/8 "2022-03-17T23:51:25Z")

</div>

@delbert_park  
안녕하세요.

메타마스크로 바오밥 네트워크 세팅하실 때 엔드포인트 URL을 어떤 걸로 지정하셨나요?

(정정)  
현재 해당 이슈 파악 중에 있습니다.  
답글 정정 죄송합니다.

---

<div class="post-metadata">

**Author:** ![Denver](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/denver/32/557_2.png) [@Denver](https://devforum.kaia.io/u/Denver)\
**Post date:** [3월 18, 2022, 7:33오전 UTC](https://devforum.kaia.io/t/topic/4398/9 "2022-03-18T07:33:10Z")

</div>

@delbert_park

메타마스크 이슈 관련 패치가 바오밥 테스트네트워크에 적용이 되었습니다.  
다시한 번 해보시겠어요?

참고: [Klaytn v1.8.1 Release Note](https://github.com/klaytn/klaytn/releases/tag/v1.8.1)
