Batch transfers pod memberships. If a signer is provided, it will execute the transaction. Otherwise it will return the unsigned tx.
Address that is giving up membership
Address that will receive membership
Array of pod IDs for which the toAddress will receive membership
If a signer is provided, then the tx will execute. Otherwise, an unsigned transaction will be returned.
Creates a safe and podifies it. If a signer is not provided, instead it returns an unsigned transaction.
Optional pod admin
Array of pod member addresses
ENS label for safe, i.e., 'orca-core'. Do not add the pod.eth/pod.xyz suffix
Voting threshold
Optional signer
Makes a custom call on the subgraph by passing a query in directly. Note that this data will likely require manual transformation to be usable.
Example: Making a call to retrieve pod IDs 1 through 3:
await customSubgraphQuery(`{
pods(where: {
id_in: [1, 2, 3]
}) {
id
users {
id
}
admin
}
}`
Which will return:
{ pods: [ { id: '1', users: [Array], admin: '0x0000000000000000000000000000000000000000' }, { id: '2', users: [Array], admin: '0x0000000000000000000000000000000000000000' }, { id: '3', users: [Array], admin: '0x4b4c43f66ec007d1dbe28f03dac975aab5fbb888' } ] }
Note these are not Pod objects as defined by the SDK.
@param query - GraphQL query
@returns
Creates a SafeTx on a safe to enable the latest Controller as a module.
Safe address
Returns an array of Pod IDs from sub graph that an address is the admin of
This function bypasses Pod construction and is mostly used for optimization purposes.
If you're unsure on what function to use, use getAdminPods
instead.
Returns an array of addresses of all pod members.
Returns a list of Pod IDs from subgraph that user is a member of.
This function bypasses Pod construction and is mostly used for optimization purposes.
If you're unsure on what function to use, use getUserPods
instead.
Gets an array of Pod objects that a user is the admin of
user address
Gets a pod object.
Pod ID (as number), safe address, or ENS name
Fetches an array of Pod objects that a user is a member of
user address
Initializes the SDK. This should be called on app startup.
Network ID. Currently supporting Mainnet (id 1) and Goerli (id 5)
Optional override for development/debug purposes.
Creates multiple pods simultaneously.
Each pod requires an array of members, a threshold and label, with an optional admin. Members or admins can be other pods in this create action.
Pods can be added as members of other pods using labels, but only with pods earlier up in the array. I.e., the second pod in the array can have the first pod in the array as a member or admin, but the first pod cannot have the second pod as a member.
The label replacement does not (currently) work with already existing pods.
An example:
[
{
label: 'orcanauts',
// This will add the below pods as sub pods to this newly created one.
members: ['art-nauts', 'gov-nauts'],
threshold: 1,
},
{
label: 'art-nauts',
members: ['0x1234...', '0x2345...'],
threshold: 1,
},
{
label: 'gov-nauts',
members: ['0x3456...', '0x4567...'],
threshold: 1,
// This will add the above 'orcanauts' pod as the admin to this new pod.
admin: 'orcanauts',
}
]
Adds a Gnosis Safe to the pod ecosystem. If a signer is not provided, it instead returns the unsigned transaction.
Optional address of admin
ENS label for safe, i.e., 'orca-core'. Do not add the pod.eth/pod.xyz suffix
Safe address
Signer of a safe owner.
Generated using TypeDoc
The config object. This object should not be manipulated directly, and is exported mostly for debug purposes.