pub struct Configuration {Show 15 fields
pub cores: Option<u8>,
pub use_honggfuzz: bool,
pub deployer_address: Option<AccountId32>,
pub max_messages_per_exec: Option<usize>,
pub report_path: Option<PathBuf>,
pub fuzz_origin: bool,
pub default_gas_limit: Option<Weight>,
pub storage_deposit_limit: Option<String>,
pub instantiate_initial_value: Option<String>,
pub constructor_payload: Option<String>,
pub verbose: bool,
pub instrumented_contract_path: Option<InstrumentedPath>,
pub fuzz_output: Option<PathBuf>,
pub show_ui: bool,
pub catch_trapped_contract: bool,
}
Fieldsยง
ยงcores: Option<u8>
Number of cores to use for Ziggy
use_honggfuzz: bool
Also use Hongfuzz as a fuzzer
deployer_address: Option<AccountId32>
ยงmax_messages_per_exec: Option<usize>
ยงreport_path: Option<PathBuf>
Output directory for the coverage report
fuzz_origin: bool
Fuzz the origin. If false
, the fuzzer will execute each message with
the same account.
default_gas_limit: Option<Weight>
The gas limit enforced when executing the constructor
storage_deposit_limit: Option<String>
The maximum amount of balance that can be charged from the caller to pay for the storage consumed.
instantiate_initial_value: Option<String>
The value
being transferred to the new account during the contract
instantiation
constructor_payload: Option<String>
In the case where you wouldnโt have any default constructor in you
smart contract, i.e new()
(without parameters), then you would
need to specify inside the config file the Vec<u8>
representation
of the SCALE-encoded data of your constructor. This typically
involved the four first bytes of the constructorโ selector,
followed by the payload.
verbose: bool
Make Phink more verbose
instrumented_contract_path: Option<InstrumentedPath>
Path where the instrumented contract will be stored after running phink instrument mycontract
By default, we create a random folder in
/tmp/ink_fuzzed_XXXX
fuzz_output: Option<PathBuf>
Path where Ziggy will drop everything (logs, corpus, etc). If None
, itโll be
output/
by default
show_ui: bool
Use the Phink UI. If set to false
, the Ziggy native UI will be used.
catch_trapped_contract: bool
If true
, the fuzzer will detect trapped contracts (ContractTrapped
) as a bug. Set this
to false if you just want to catch invariants. Set this to true if you want any kind of
bugs.
Implementationsยง
Sourceยงimpl Configuration
impl Configuration
pub fn deployer_address(&self) -> &AccountId32
Sourceยงimpl Configuration
impl Configuration
pub fn should_fuzz_origin(&self) -> OriginFuzzingOption
pub fn instrumented_contract(&self) -> PathBuf
pub fn save_as_toml(&self, to: &str) -> EmptyResult
pub fn parse_balance(value: &Option<String>) -> Option<BalanceOf<Runtime>>
Trait Implementationsยง
Sourceยงimpl Clone for Configuration
impl Clone for Configuration
Sourceยงfn clone(&self) -> Configuration
fn clone(&self) -> Configuration
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSourceยงimpl Debug for Configuration
impl Debug for Configuration
Sourceยงimpl Default for Configuration
impl Default for Configuration
Sourceยงimpl<'de> Deserialize<'de> for Configuration
impl<'de> Deserialize<'de> for Configuration
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Sourceยงimpl PartialEq for Configuration
impl PartialEq for Configuration
Sourceยงimpl Serialize for Configuration
impl Serialize for Configuration
Sourceยงimpl TryFrom<&PathBuf> for Configuration
impl TryFrom<&PathBuf> for Configuration
Sourceยงimpl TryFrom<String> for Configuration
impl TryFrom<String> for Configuration
impl Eq for Configuration
impl StructuralPartialEq for Configuration
Auto Trait Implementationsยง
impl Freeze for Configuration
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnwindSafe for Configuration
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Sourceยงfn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Sourceยงfn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Sourceยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.Sourceยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.Sourceยงimpl<T> DowncastSync for T
impl<T> DowncastSync for T
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Sourceยงfn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSourceยงimpl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Sourceยงimpl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Sourceยงfn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Sourceยงimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Sourceยงfn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Sourceยงfn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moreSourceยงimpl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Sourceยงimpl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Sourceยงfn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.Sourceยงimpl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Sourceยงfn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.