Queries the built-in actors known by the System actor.
(
&self,
height: FvmQueryHeight,
)
| 109 | |
| 110 | /// Queries the built-in actors known by the System actor. |
| 111 | async fn builtin_actors( |
| 112 | &self, |
| 113 | height: FvmQueryHeight, |
| 114 | ) -> anyhow::Result<QueryResponse<BuiltinActors>> { |
| 115 | let res = self |
| 116 | .perform(FvmQuery::BuiltinActors, height) |
| 117 | .await |
| 118 | .context("builtin actors query failed")?; |
| 119 | let height = res.height; |
| 120 | let value = { |
| 121 | let registry: Vec<(String, Cid)> = extract(res, |res| { |
| 122 | fvm_ipld_encoding::from_slice(&res.value) |
| 123 | .context("failed to decode BuiltinActors from query") |
| 124 | })?; |
| 125 | BuiltinActors { registry } |
| 126 | }; |
| 127 | Ok(QueryResponse { height, value }) |
| 128 | } |
| 129 | |
| 130 | /// Run an ABCI query. |
| 131 | async fn perform(&self, query: FvmQuery, height: FvmQueryHeight) -> anyhow::Result<AbciQuery>; |