This subgraph indexes Safes, Timelocks, and related governance data created by the Kleidi Instance Deployer contract across multiple networks.
This subgraph is deployed across the following networks:
- Base (Chain ID: 8453)
- Ethereum Mainnet (Chain ID: 1)
- Optimism (Chain ID: 10)
See query-examples.md for example GraphQL queries to fetch data from this subgraph.
The subgraph tracks the following entities:
-
SystemInstance: Links a Safe and Timelock created together by the Instance Deployerid: Unique identifier for the instancesafe: The Safe contract address (hex string)timelock: The Timelock contract address (hex string)safeData: Reference to the Safe entitytimelockData: Reference to the Timelock entitycreator: Address that deployed the instancecreationTime: Timestamp of creation
-
Safe: A Gnosis Safe multisig walletid: The Safe contract addressowners: Array of owner addressesthreshold: Number of signatures required for executionsystemInstance: Reference to the SystemInstance that created it
-
Owner: An EOA that owns one or more Safes (enables reverse lookup by owner address)id: The owner's addresssafes: Array of Safes this address owns
-
Timelock: Governance module with time delays and hot signer capabilitiesid: The Timelock contract addressminDelay: Minimum delay for scheduled operations (in seconds)expirationPeriod: Time window for executing scheduled operationsguardian: Current pause guardian addresspauseDuration: How long a pause lastsisPaused: Whether the timelock is currently pausedpauseEndTime: When the pause will end (if paused)hotSigners: Array of hot signer addresseshotSignerEntities: Reference to HotSigner entities for reverse lookupsystemInstance: Reference to the SystemInstance that created it
-
HotSigner: An address with instant execution privileges on a Timelockid: The hot signer's addresstimelocks: Array of Timelocks where this address is a hot signer
-
TimelockProposal: A scheduled operation in the Timelockid: Unique identifier (bytes32 proposal hash)timelock: Reference to the parent Timelocktargets: Array of target contract addressesvalues: Array of ETH values to sendpayloads: Array of calldata for each operationexecutionTime: When the proposal can be executedexecuted: Whether the proposal has been executedcancelled: Whether the proposal has been cancelledexpired: Whether the proposal has expiredscheduledAt: When the proposal was scheduled (null for historical)executedAt: When executed (null if not)cancelledAt: When cancelled (null if not)
-
CalldataWhitelist: Whitelisted function calls that hot signers can execute instantlyid: Unique identifier (timelock-contract-selector-startIndex-endIndex)timelock: Reference to the parent TimelockcontractAddress: Contract address the call is allowed onselector: Function selector (bytes4)startIndex: Calldata check start positionendIndex: Calldata check end positiondataHashes: Array of whitelisted data hashesisActive: Whether currently activeaddedAtBlock: Block when added
The InstanceDeployer contract is deployed at the same address across all supported networks:
InstanceDeployer: 0xE138136bFF8c6A9337805DE19177E3b29fef2783
- Base: 23801110
- Ethereum Mainnet: 21674801
- Optimism: 129396729
yarn installThe subgraph can be deployed to different networks using the following commands:
yarn prepare:base && yarn codegen && yarn build && yarn deploy:baseyarn prepare:mainnet && yarn codegen && yarn build && yarn deploy:mainnetyarn prepare:optimism && yarn codegen && yarn build && yarn deploy:optimism- For networks not indexed by The Graph (like Base), we use Goldsky
- First time deploying with Goldsky: run
goldsky login - If you already have an existing subgraph, you may need to delete it before deploying a new version
- You may need to add
--product hosted-service --access-token {TOKEN}as extra parameters after "goldsky subgraph deploy" in the package.json file
To fetch all timelock and Gnosis Safe pairs created:
{
systemInstances(first: 1000) {
id
safe
safeData {
id
owners
threshold
}
timelock
timelockData {
id
minDelay
}
creator
creationTime
}
}Query all Safes where a specific address is an owner:
{
owners(where: { id: "0xYOUR_ADDRESS" }) {
safes {
id
threshold
owners
}
}
}Query all Timelocks where a specific address has hot signer privileges:
{
hotSigners(where: { id: "0xYOUR_ADDRESS" }) {
timelocks {
id
minDelay
}
}
}Fetch all pending proposals for a specific Timelock:
{
timelockProposals(where: {
timelock: "0xTIMELOCK_ADDRESS",
executed: false,
cancelled: false
}) {
id
targets
values
payloads
executionTime
scheduledAt
}
}For more query examples, see the query-examples.md file.