[Deployment] Bootloader-based tx failed #1005
-
Team or ProjectNo response ZK chainSepolia EnvironmentTestnet L2 block numberNo response zkSolc Version1.5.6 zksync-ethers Version6.17.0 Minimal Reproducible Code or Repo Linksrc/utils/reclaimVerifier.js import { ethers } from 'ethers'; // ethers v6
import { Provider, Wallet } from "zksync-ethers";
import ReclaimVerifierABI from '../constants/ReclaimVerifierABI.json';
const CONTRACT_ADDRESS = import.meta.env.VITE_RECLAIM_VERIFIER;
const RPC_URL = import.meta.env.VITE_RPC_URL;
const SIGNER_KEY = import.meta.env.VITE_SIGNER_KEY
export async function verifyProofOnChain(proofStruct) {
const zkProvider = new Provider(RPC_URL);
const signer = new Wallet(SIGNER_KEY, zkProvider);
const contract = new ethers.Contract(CONTRACT_ADDRESS, ReclaimVerifierABI, signer);
console.log(proofStruct);
try {
const encoded = contract.interface.encodeFunctionData("verifyUserProof", [
[ // proof (single tuple)
[ // claimInfo
proofStruct.claimInfo.provider,
proofStruct.claimInfo.parameters
],
[ // signedClaim
[
proofStruct.signedClaim.claim.identifier,
proofStruct.signedClaim.claim.epoch,
proofStruct.signedClaim.claim.timestampS
],
proofStruct.signedClaim.signatures
]
]
]);
console.log("Encoded data:", encoded);
const code = await zkProvider.getCode("0x15b8C1F0B0f583dfdD8337D7fB6Bf87b294295E7");
console.log("Contract bytecode:", code);
console.log(code.length); // > 2 means deployed
console.log("encoded:", encoded); // must start with "0x"
console.log("typeof encoded:", typeof encoded); // must be string
console.log("length:", encoded.length); // must be > 10
console.log(contract.interface.getFunction("verifyUserProof"));
const txRequest = {
to: CONTRACT_ADDRESS,
data: encoded,
gasLimit: 1_500_000, // increase to be safe
maxFeePerGas: ethers.parseUnits("100", "gwei"), // required on zkSync
value: 0
}
const sentTx = await signer.sendTransaction(txRequest);
const receipt = await sentTx.wait();
return { success: true, receipt };
} catch (err) {
console.error('On-chain verification failed:', err);
return { success: false, error: err };
}
} src/constants/ReclaimVerifierABI.json: [
{
"inputs": [
{
"internalType": "address",
"name": "_reclaim",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "reclaim",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"components": [
{
"internalType": "string",
"name": "provider",
"type": "string"
},
{
"internalType": "string",
"name": "parameters",
"type": "string"
}
],
"internalType": "struct IReclaim.ClaimInfo",
"name": "claimInfo",
"type": "tuple"
},
{
"components": [
{
"components": [
{
"internalType": "bytes32",
"name": "identifier",
"type": "bytes32"
},
{
"internalType": "uint32",
"name": "epoch",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "timestampS",
"type": "uint32"
}
],
"internalType": "struct IReclaim.Claim",
"name": "claim",
"type": "tuple"
},
{
"internalType": "bytes[]",
"name": "signatures",
"type": "bytes[]"
}
],
"internalType": "struct IReclaim.SignedClaim",
"name": "signedClaim",
"type": "tuple"
}
],
"internalType": "struct IReclaim.Proof",
"name": "proof",
"type": "tuple"
}
],
"name": "verifyUserProof",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
] Does this work on other EVMs? (If yes, please list at least 1 of them)Not sure Description of What Your Contract DoesCurrently trying to implement a Reclaim Protocol proof verification smart contract on zkSync Sepolia Testnet. This is one of the failing tx hashes for this: Additional DetailsNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @ash-jyc! "Bootloader-based tx failed" is an error message you get when the revert reason is not available. Unfortunately I cannot help more without seeing the contract code. Feel free to unmark this discussion as answered if you have further questions. |
Beta Was this translation helpful? Give feedback.
Hi @ash-jyc! "Bootloader-based tx failed" is an error message you get when the revert reason is not available. Unfortunately I cannot help more without seeing the contract code.
Feel free to unmark this discussion as answered if you have further questions.