-
Notifications
You must be signed in to change notification settings - Fork 20
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
Scripts to generate payloads needed to do administrative config changes on dvn #6
base: main
Are you sure you want to change the base?
Conversation
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is a CVE?Contains a high severity Common Vulnerability and Exposure (CVE). Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies. What is a critical CVE?Contains a Critical Common Vulnerability and Exposure (CVE). Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies. What is unstable ownership?A new collaborator has begun publishing package versions. Package stability and security risk may be elevated. Try to reduce the number of authors you depend on to reduce the risk to malicious actors gaining access to your supply chain. Packages should remove inactive collaborators with publishing rights from packages on npm. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
cd58c7d
to
48edd29
Compare
@@ -0,0 +1,143 @@ | |||
import { ethers } from 'ethers' | |||
import { GcpKmsSigner } from 'ethers-gcp-kms-signer' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good enough for now but this wont be extensible for non evm chains
@@ -0,0 +1,16 @@ | |||
[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add README for dvn-addresses-testnet.json
and kms-keyids-testnet.json
and also comments in the script code so developers know what they need to prepare to run the script
await Promise.all( | ||
availableChainNames.map(async (chainName) => { | ||
results[chainName] = results[chainName] || {} | ||
const vId = getChainIdForNetwork(chainName, environment, '2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will break if monorepo does not have that chain for ulnv2 which is the case for some of the newer endpoints that only has 302.
we use this in offchain-monorepo:
export const getVId = (chainName: string, environment: string): string => {
// By convention the vid is alwayd the endpointV1 chainId
// TODO: Monorepo doesnt have these chains for EndpointVersion.V1
if (['solana', 'ton', 'initia', 'movement'].includes(chainName)) {
const eid = getChainIdForEndpointVersion(
chainName,
environment,
EndpointVersion.V2,
)
return (parseInt(eid) % 30000).toString()
}
return getChainIdForEndpointVersion(
chainName,
environment,
EndpointVersion.V1,
)
}
await Promise.all( | ||
availableChainNames.map(async (chainName) => { | ||
results[chainName] = results[chainName] || {} | ||
const vId = getChainIdForNetwork(chainName, environment, '2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
availableChainNames.map(async (chainName) => { | ||
results[chainName] = results[chainName] || {} | ||
const vId = getChainIdForNetwork(chainName, environment, '2') | ||
const callData = getCallData(newQuorum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a lot of duplicate code here that can probably benefit from just a function that iterates and generates signatures based on callbacks. i don't mind this for now but if we add more dvn signer functions this will get a bit error-prone to manual update.
No description provided.