Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

432
Views
Error: Returned error: unknown account error

Hi I'm using klaytn network now. My purpose is implementing smartcontract on backend-server. I'm using post method to send user's wallet address now. Here is my code.


//Test network caver
const caver = new Caver("https://api.baobab.klaytn.net:8651");

const keystore = fs.readFileSync(
    "./keystore-0x405679e8548dd2dd53cecf5cce2a9b58f44943a7-2022-4-20.json",
    "utf-8"
);
const keyring = caver.wallet.keyring.decrypt(keystore, "dlaghddnjs9^");

const NoAContract = caver.contract.create(
    abi,
    "0x4B8035af8c66E42879E5AEfacac1DA914F0C5443"
);
caver.wallet.add(keyring);
app.post("/smartcontract", upload.single("photo"), (req, res) => {
    //console.log(NoAContract);
    var byte = req.file.size;
    //console.log(req.file.size);

    var title = req.body.title;
    //console.log(title);

    var desc = req.body.description;
    //console.log(desc);

    var wallet = req.body.wallet;
    //console.log(wallet);

    NoAContract.methods
        .uploadPhoto(byte, title, desc)
        .send({
            from: wallet,
            gas: "8500000",
            gasPrice: null,
        })
        .then(console.log("minted"))
        .catch((error) => {
            console.error(error);
        });
});

app.listen(port, () => {
    console.log(`Example app listening on port ${port}`);
});

The var's data is transferred good now. I don't know what the cause is.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!