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

[VEN-2661]: Tool to fetch permissions granted by ACM on all supporting chains #77

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from

Conversation

GitGuru7
Copy link
Contributor

@GitGuru7 GitGuru7 commented Jul 3, 2024

Description

Based on the given network all the permissions that are granted by ACM (and not yet revoked) by ACM is generated in scripts/ACMPermissions//networks/<network_name>/permissions.md

To interact with the tool, use this command
npx hardhat run scripts/ACMPermissions/index.ts --network <network_name>

Resolves VEN-2661

@GitGuru7 GitGuru7 self-assigned this Jul 3, 2024

const { permissions: existingPermissions } = this.getPermissionsJson();
this.existingPermissions = existingPermissions;
this.blocksParsed = this.getLastBlockNumber();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this function? I think getPermissionsJson returns the height stored in the permissions file, or the default value

}

private getHash(contractAddress: string, functionSignature: string): string {
const hash = ethers.utils.solidityKeccak256(["string", "string"], [contractAddress, functionSignature]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using here ["string", "string"] instead of ["address", "string"] as we are doing in line 170. Moreover, could we use getHash in line 170, instead of solidityPack + keccak256?

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

Successfully merging this pull request may close these issues.

4 participants