Skip to content
New issue

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

add DeleteFromIndexer in current cli code #198

Closed
pivilartisant opened this issue Dec 18, 2024 · 2 comments
Closed

add DeleteFromIndexer in current cli code #198

pivilartisant opened this issue Dec 18, 2024 · 2 comments

Comments

@pivilartisant
Copy link
Collaborator

Blocked here:

@pivilartisant
Copy link
Collaborator Author

export async function deleteWebsiteFromIndexer(
  ScAddress: string,
  provider: Provider
) {
  try {
    const defaultParams = {
      target: getIndexerSCAddress((await provider.networkInfos()).chainId),
      coins: BigInt(1),
      fee: (await provider.networkInfos()).minimalFee
    };
    const callSCParams: CallSCParams = {
      func: "removeWebsite",
      parameter: new Args().addString(ScAddress),
      ...defaultParams
    };
    const op = await provider.callSC(callSCParams);
    await op.waitFinalExecution();
    console.log("successfully deleted website from indexert");
  } catch (error) {
    console.error("Error during website delete form indexer:", error);
  }
}

@pivilartisant
Copy link
Collaborator Author

Not needed in CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant