Error when contract call via Contract instance with account in Node.
Closed this issue · 0 comments
Describe the bug
When use Contract instance to call contract with account in Node, "Error: Only Legacy transactions can be signed on a Klaytn node!" error is occured.
How to reproduce
// imoprt key and unlock the account in Node.
await caver.klay.personal.importRawKey(senderPrvKey, 'passphrase')
await caver.klay.personal.unlockAccount(senderAddress, 'passphrase')
// Call contract with Contract instacne
const contractInst = new caver.klay.Contract(helloContractABI)
contractInst.options.address = contractAddress
const execReceipt = await contractInst.methods.say().send({
from: senderAddress,
gas: 30000,
})
Expected behavior
Without error, contract has to be called.
Attachments
If applicable, add data, logs or screenshots to help explain your problem.
Environment (please complete the following information)
- caver-js v1.0.1-rc.7
- macOS/10.14
Additional context
Add any other context about the problem here.