# methods.estimateGas() 문제

**URL:** <https://devforum.kaia.io/t/methods-estimategas/2165>\
**Category:** Caver\
**Created:** [10월 25, 2021, 6:53오전 UTC](https://devforum.kaia.io/t/methods-estimategas/2165 "2021-10-25T06:53:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theman](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@theman](https://devforum.kaia.io/u/theman)\
**Post date:** [10월 25, 2021, 6:53오전 UTC](https://devforum.kaia.io/t/methods-estimategas/2165/1 "2021-10-25T06:53:01Z")

</div>

안녕하세요! cypress에서 estimateGas할 때 해당 에러가 뜹니다

`gas required exceeds allowance or always failing transaction`

사용한 방식은 caver.contract.methods.METHODNAME.estimateGase({from:account}) 입니다. 다른 method는 동일한 방법으로 estimateGas했을 때 잘 작동하고 있으나 특정 method만 안되는것 같습니다.

그래서 transcation을 보낼때 gas한도를 100만으로 하드코딩해서 보낸 결과 실제 gas Used는 463,993이었습니다. 혹시 estimateGas 할 때 estimate할 수 있는 한도가 따로 정해져있나요?

---

<div class="post-metadata">

**Author:** ![Jamie](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/jamie/32/1472_2.png) [@Jamie](https://devforum.kaia.io/u/Jamie)\
**Post date:** [10월 25, 2021, 7:05오전 UTC](https://devforum.kaia.io/t/methods-estimategas/2165/2 "2021-10-25T07:05:47Z")

</div>

안녕하세요.

[contract.methods.methodName(…params).estimateGas({from})](https://docs.klaytn.com/bapp/sdk/caver-js/api-references/caver.contract#methods-methodname-estimategas) 이런식으로 실행한 것이 맞는지 확인 부탁드립니다.

만약 위와 같이 실행했는데 에러가 발생한다면 에러 재현을 할 수 있는 코드도 같이 올려주시면 감사하겠습니다.
