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 a getBotId utility function #195

Open
haseebrabbani opened this issue Jul 8, 2022 · 0 comments
Open

Add a getBotId utility function #195

haseebrabbani opened this issue Jul 8, 2022 · 0 comments
Assignees

Comments

@haseebrabbani
Copy link
Collaborator

Currently a bot does not have a way to get its own bot ID (unless its hardcoded). The SDK should provide a getBotId helper method to achieve this.

The bot ID is either read from a local forta.config.json (set by the agentId property), OR calculated by hashing the package.json name property. The presence of the forta.config.json field can change the returned botId value. We need to determine how to provide the same value all the time.

Ideally we should not copy forta.config.json into the container since it can have sensitive information (e.g. RPC API keys). then it follows that maybe we should move the botId into package.json (and stop hashing the package.json name altogether)

@Robert-H-Leonard Robert-H-Leonard self-assigned this Aug 1, 2022
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

2 participants