-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: Basic SpokePool verification task #582
base: master
Are you sure you want to change the base?
Conversation
This task intends to automate reading a small number of variables from the SpokePool on a given chain. This is currently limited to the set of common variables that are shared amongst all SpokePool deployments, but could be extended to query chain-specific SpokePool variables. This should be run by any operator deploying a SpokePool to a new chain, and may also be integrated into CI. Signed-off-by: Paul <[email protected]>
const spokePool = await SpokePool__factory.connect(spokeAddress, provider); | ||
|
||
// Log state from SpokePool | ||
const originChainId = await spokePool.chainId(); |
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.
I'll wrap these in a multicall to speed up the queries.
import { task } from "hardhat/config"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { getDeployedAddress } from "../src/DeploymentUtils"; | ||
import { SpokePool__factory } from "../typechain"; |
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 may be a problem; typechain might not be available at the time this is built.
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.
Example output:
~/dev/across-protocol/contracts$ yarn hardhat verify-spokepool --network zora
yarn run v1.22.15
$ /home/phk/dev/across-protocol/contracts/node_modules/.bin/hardhat verify-spokepool --network zora
SpokePool.chainId() : 7777777
SpokePool.getCurrentTime() : 1723675599 (Wed, 14 Aug 2024 22:46:39 GMT)
SpokePool.depositQuoteTimeBuffer() : 3600
SpokePool.fillDeadlineBuffer() : 21600
SpokePool.wrappedNativeToken() : 0x4200000000000000000000000000000000000006
SpokePool.hubPool() : 0xc186fA914353c44b2E33eBE05f21846F1048bEda
SpokePool.crossDomainAdmin() : 0xc186fA914353c44b2E33eBE05f21846F1048bEda
Deposit routes : 0
Done in 15.39s.
This task intends to automate reading a small number of variables from the SpokePool on a given chain. This is currently limited to the set of common variables that are shared amongst all SpokePool deployments, but could be extended to query chain-specific SpokePool variables.
This should be run by any operator deploying a SpokePool to a new chain, and may also be integrated into CI.