안녕하세요.
다름이 아니라 개발 중인 코드 중 일부가 baobab에서는 동작하고, cypress에서는 동작하지 않아서 질문 드립니다.
코드와 에러 첨부드립니다.
+@ gasPrice에 변경관련 메일을 받은게 기억나서 750ston을 명시하면, Error: Returned error: invalid unit price 라는 에러가 나고요.
const callobj = this.contract.methods.safeTransfer(to, value)
const gas = await callobj.estimateGas({from: this.sender.address}); // gas 조회
console.log('[*] estimated gas:', gas)
const result = await callobj.send({
from: this.sender.address,
gas
}); // tx send
에러는 아래와 같습니다.
Error: out of gas
{
"blockHash": "0x2532a2522ccce61d138c8fea0da36c5620fccd3a6d3f652f70d97d261cb01ad5",
"blockNumber": 85542849,
"contractAddress": null,
"from": "0xdf977ea48ac6afe2fd7caab6b47a717cf398d822",
"gas": "0x92ac",
"gasPrice": "0x5d21dba00",
"gasUsed": 37548,
"input": "0x423f6cef000000000000000000000000b83f74246fc4d535ceb9c45a6a8dd79705b0895a000000000000000000000000000000000000000000000000000000000000000a",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x55",
"senderTxHash": "0xae2ad9d649c1c839b3f2944d4b1f367b6263f0b3638246f1799aa676bff31191",
"signatures": [
{
"V": "0x4056",
"R": "0x20824357d9d99a3f3f3b60758f3eb08f79e28d2078d2f03e1f45bf0efa81196a",
"S": "0x6632b22133906a9a3629e08c1ec23da2b9b160832eb775b4cf4c8e1b2ce981ab"
}
],
"status": false,
"to": "0x99d7f56cf9c75d998ea78f03b6783b1f7d4e2d75",
"transactionHash": "0xae2ad9d649c1c839b3f2944d4b1f367b6263f0b3638246f1799aa676bff31191",
"transactionIndex": 1,
"txError": "0x7",
"type": "TxTypeSmartContractExecution",
"typeInt": 48,
"value": "0x0",
"events": {}
}