pub struct ScenarioBuilder { /* private fields */ }Expand description
Builder for a Scenario. Every setting is explicit.
Implementations§
Source§impl ScenarioBuilder
impl ScenarioBuilder
Sourcepub fn bootstrap_accounts(self) -> Self
pub fn bootstrap_accounts(self) -> Self
Use hosted schema-3 deterministic bootstrap accounts. Local schema-4 rejects this adapter.
A local manifest carries public keys only, so it cannot supply signing keys. For an existing local node, use the scenario-owned accounts and fund them explicitly.
Sourcepub fn accounts(self, count: usize) -> Self
pub fn accounts(self, count: usize) -> Self
Number of scenario-owned fixture accounts for live targets (default: 10). The scenario seed owns these keys; the runtime receives only public allocations.
Sourcepub fn network(self, network: NetworkConfig) -> Self
pub fn network(self, network: NetworkConfig) -> Self
Set the network the scenario runs against. Required.
Sourcepub fn artifact(self, name: impl Into<String>, path: impl Into<PathBuf>) -> Self
pub fn artifact(self, name: impl Into<String>, path: impl Into<PathBuf>) -> Self
Register a contract artifact loaded from a file, inferring its kind from
the .rv32a extension. The file is read and validated at
ScenarioBuilder::build. Agents deploy it by name.
Sourcepub fn artifact_with_kind(
self,
name: impl Into<String>,
path: impl Into<PathBuf>,
kind: ArtifactKind,
) -> Self
pub fn artifact_with_kind( self, name: impl Into<String>, path: impl Into<PathBuf>, kind: ArtifactKind, ) -> Self
Register a contract artifact from a file with an explicit kind.
Sourcepub fn artifact_bytes(
self,
name: impl Into<String>,
bytes: impl Into<Vec<u8>>,
_kind: ArtifactKind,
) -> Self
pub fn artifact_bytes( self, name: impl Into<String>, bytes: impl Into<Vec<u8>>, _kind: ArtifactKind, ) -> Self
Register a contract artifact from in-memory bytes (for example via
include_bytes!) with an explicit kind.