# Contract method에 send할때 나오는 오류

**URL:** <https://devforum.kaia.io/t/contract-method-send/4229>\
**Category:** General / 미분류\
**Created:** [3월 6, 2022, 9:36오전 UTC](https://devforum.kaia.io/t/contract-method-send/4229 "2022-03-06T09:36:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![STF](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@STF](https://devforum.kaia.io/u/STF)\
**Post date:** [3월 6, 2022, 9:36오전 UTC](https://devforum.kaia.io/t/contract-method-send/4229/1 "2022-03-06T09:36:54Z")

</div>

우선 call을 통해서 컨트랙 method를 부르는데 문제 없음을 확인했습니다.

헌데 아래처럼 method를 send하면 오류가 납니다.

contract.methods.mainMint( amount ).send({from: window.klaytn.selectedAddress, gas: 3000000, value: price}, function(error, result) {

```
    console.log(result);

```

});

send에서 value를 패스하는 방법이 잘못된 것일까요? 오류는 아래와 같습니다.

Uncaught (in promise) Error: evm: execution reverted  
{  
“blockHash”: “0x7f5ce61d2fb83420594406562b6267a152308186fcf2116ea47f035089c90622”,  
“blockNumber”: 84989036,  
“contractAddress”: null,  
“from”: “0x15b5185cf69bf9940a1ffd008be2c0b6816a8c8a”,  
“gas”: “0x2dc6c0”,  
“gasPrice”: “0xae9f7bcc00”,  
“gasUsed”: 30074,  
“input”: “0xf578d9df0000000000000000000000000000000000000000000000000000000000000001”,  
“logsBloom”: “0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000”,  
“nonce”: “0xe”,  
“senderTxHash”: “0x34c473bee4f4b2126aea82af15d22df690907955cea8f0eae6d4e8bcc1993f5f”,  
“signatures”: [  
{  
“V”: “0x7f5”,  
“R”: “0x235a846879c05e62565cc3d75ea0c7d6347318152caa898e8d2f67ba1fdfacf8”,  
“S”: “0x6b6fb5b97232eca4dc2da57c3ec54d7418997b47f98412b94640060c58c29784”  
}  
],  
“status”: false,  
“to”: “0xc85524614a52b46d2a4755272568f82e14285b16”,  
“transactionHash”: “0x34c473bee4f4b2126aea82af15d22df690907955cea8f0eae6d4e8bcc1993f5f”,  
“transactionIndex”: 0,  
“txError”: “0x9”,  
“type”: “TxTypeLegacyTransaction”,  
“typeInt”: 0,  
“value”: “0xde0b6b3a7640000”,  
“events”: {}  
}  
at checkForNormalTx (index.js:764:1)  
at index.js:640:1

---

<div class="post-metadata">

**Author:** ![STF](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@STF](https://devforum.kaia.io/u/STF)\
**Post date:** [3월 6, 2022, 10:10오전 UTC](https://devforum.kaia.io/t/contract-method-send/4229/2 "2022-03-06T10:10:20Z")

</div>

value를 보내지 않아도 되는 function에 send로 access할때는 문제없이 되네요…ㅠㅠ 뭐가 문젤까요

---

<div class="post-metadata">

**Author:** ![STF](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@STF](https://devforum.kaia.io/u/STF)\
**Post date:** [3월 7, 2022, 2:25오전 UTC](https://devforum.kaia.io/t/contract-method-send/4229/3 "2022-03-07T02:25:22Z")

</div>

value를 보내는 function만 잘되지 않는데 제가 call한 방법이 틀린건가요 도와주세요!!

---

<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월 7, 2022, 3:42오전 UTC](https://devforum.kaia.io/t/contract-method-send/4229/4 "2022-03-07T03:42:42Z")

</div>

안녕하세요

해당 트랜잭션의 오류를 내용이 `Rhythmic Monkey Club: sale is not active` 이렇게 나오는데

mainMint의 require 조건이 안맞는것같은데 확인 부탁드립니다.

> **[Klaytnscope](https://baobab.scope.klaytn.com/tx/0x34c473bee4f4b2126aea82af15d22df690907955cea8f0eae6d4e8bcc1993f5f?tabId=internalTx)**
>
> Klaytnscope allows you to find data by monitoring network health and statistics of Klaytn as well as profiling blocks and transactions on Klaytn.

---

<div class="post-metadata">

**Author:** ![STF](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@STF](https://devforum.kaia.io/u/STF)\
**Post date:** [3월 7, 2022, 3:52오전 UTC](https://devforum.kaia.io/t/contract-method-send/4229/5 "2022-03-07T03:52:35Z")

</div>

scope내에서 트잭 오류를 확인할 수 있었군요. 감사합니다. 컨트랙을 매번 새로 만들어서 쓰다보니 옛날 컨트랙을 사용해서 sale 조건이 안맞게 설정되어있었습니다…감사합니다…ㅎㅎ
