plan.list
Lists the saved plans of this client's chain and of its chains, newest first. Parameters, return value, errors and examples for plan.list in @ensforge/sdk.
Lists the saved plans of this client's chain and of its chains, newest first.
When to use
Use to offer unfinished registrations or migrations after a reload.
Details
- Filter by the account that prepared them and by status (
pending,completed,failed).
Signature
function list(client: Like, options: list.Options): Promise<list.ReturnType>Call it as ens.plan.list(options) on a client, or Actions.plan.list(client, options).
plan.list.request(options) builds a deferred read for Actions.batch. See Look up many at once.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
account | string | Only plans prepared for this account. | |
status | Plan.Record["status"] | Only plans with this status. |
Returns
Resolves to readonly Plan.Record[]. The saved plans, newest first.
| Field | Type | Description |
|---|---|---|
plan | Plan | |
status | "pending" | "completed" | "failed" | pending while steps remain, completed once every step is submitted. |
submitted | Readonly<globalThis.Record<string, readonly Hex[]>> | Transaction hashes per submitted step id. |
bundles | Readonly<globalThis.Record<string, string>> | EIP-5792 bundle id per step sent in a bundle. |
references (optional) | Readonly<globalThis.Record<string, string>> | Route references per step sent through via (e.g. UserOperation hashes). |
error (optional) | string | Message of the last failure. |
updatedAt | number | Unix time in milliseconds. |
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_ADDRESS | an invalid account. |
PlanError | PLAN_INVALID | a saved plan cannot be read. |
NetworkError | RPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITED | the RPC request fails. |
It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
const records = await ens.plan.list({ status: "failed" })See also
plan.getto read one
Was this page helpful?