We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am getting module not available for chain 80002 when executing a safe userop transaction using @safe-global/relay-kit
@safe-global/relay-kit
Safe Core SDK versions:
Environment:
import { Safe4337Pack } from "@safe-global/relay-kit"; import { concat, toHex } from "viem"; const SIGNER_ADDRESS = "SIGNER_ADDRESS "; // ... const SIGNER_PRIVATE_KEY = "SIGNER_PRIVATE_KEY "; // ... const PIMLICO_API_KEY = "PIMLICO_API_KEY "; const RPC_URL = `https://api.pimlico.io/v2/80002/rpc?apikey=` + PIMLICO_API_KEY; const safe_userop = async () => { const safe4337Pack = await Safe4337Pack.init({ provider: RPC_URL, signer: SIGNER_PRIVATE_KEY, bundlerUrl: `https://api.pimlico.io/v2/80002/rpc?apikey=${PIMLICO_API_KEY}`, options: { owners: [SIGNER_ADDRESS], threshold: 1, }, // ... paymasterOptions: { isSponsored: true, paymasterUrl: `https://api.pimlico.io/v2/80002/rpc?apikey=${PIMLICO_API_KEY}`, sponsorshipPolicyId: "sponsorshipPolicyId", }, }); // Define the transactions to execute const transaction1 = { to: SIGNER_ADDRESS, data: "0x", value: BigInt(0).toString(), }; // Build the transaction array const transactions = [transaction1]; // Create the SafeOperation with all the transactions const safeOperation = await safe4337Pack.createTransaction({ transactions }); const onchainIdentifier = toHex( "SAMPLE_TX", { size: 16 } ); safeOperation.data.callData = concat([ safeOperation.data.callData as `0x{string}`, onchainIdentifier, ]).toString(); const identifiedSafeOperation = await safe4337Pack.getEstimateFee({ safeOperation, }); const signedSafeOperation = await safe4337Pack.signSafeOperation( identifiedSafeOperation ); const userOperationHash = await safe4337Pack.executeTransaction({ executable: signedSafeOperation, }); let userOperationReceipt = null; while (!userOperationReceipt) { // Wait 2 seconds before checking the status again await new Promise((resolve) => setTimeout(resolve, 2000)); userOperationReceipt = await safe4337Pack.getUserOperationReceipt( userOperationHash ); } const userOperationPayload = await safe4337Pack.getUserOperationByHash( userOperationHash ); console.log("User operation payload: ", userOperationPayload); console.log("User operation receipt: ", userOperationReceipt); }; safe_userop().catch(console.error);
When running this on polygon amoy chain I get this error: (This works when executing in sepolia network)
Should be able to execute the userop transaction
The text was updated successfully, but these errors were encountered:
This module is missing at our directory for modules
Needs to be added before it can be used in safe-core-sdk safe-global/safe-modules-deployments#44
Sorry, something went wrong.
No branches or pull requests
Description
I am getting module not available for chain 80002 when executing a safe userop transaction using
@safe-global/relay-kit
Environment
Safe Core SDK versions:
Environment:
Steps to reproduce
When running this on polygon amoy chain I get this error: (This works when executing in sepolia network)
Expected result
Should be able to execute the userop transaction
The text was updated successfully, but these errors were encountered: