• Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses and challenges
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

303
Views
ProviderError: Error: Transaction reverted without a reason string

I am trying to run a certain function after deploying the smart contract. the transaction unfortunately is always being reverted without any reason.

This is my code :

function sign(bytes32 hash, bytes32 signatureHash, address signer) public {
    console.log("Entered Sign Function");
   // require(checkDoc(hash),"check doc failed");
     //   require(documents[hash].signers[signer] == 1, "signer failed");
        documents[hash].remainingSignatures--;
        documents[hash].signers[signer] = block.timestamp;
        emit Signature(hash, signatureHash, signer, 'Signature');
        if (documents[hash].remainingSignatures == 0){
            documents[hash].status = currentState.signed;
            emit Signed(hash, 'Signed');
}
}

I am using hardhat for local development and alchemy for provider. The transaction is getting reverted without any reasons.

9 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.