Skip to main content

IBlueprintServiceManagerInstance

Struct IBlueprintServiceManagerInstance 

Source
pub struct IBlueprintServiceManagerInstance<P, N = Ethereum> { /* private fields */ }
Expand description

A IBlueprintServiceManager instance.

Contains type-safe methods for interacting with an on-chain instance of the IBlueprintServiceManager contract located at a given address, using a given provider P.

If the contract bytecode is available (see the sol! documentation on how to provide it), the deploy and deploy_builder methods can be used to deploy a new instance of the contract.

See the module-level documentation for all the available methods.

Implementations§

Source§

impl<P, N> IBlueprintServiceManagerInstance<P, N>
where P: Provider<N>, N: Network,

Instantiation and getters/setters.

Source

pub const fn new( address: Address, __provider: P, ) -> IBlueprintServiceManagerInstance<P, N>

Creates a new wrapper around an on-chain IBlueprintServiceManager contract instance.

See the wrapper’s documentation for more details.

Source

pub async fn deploy( __provider: P, ) -> Result<IBlueprintServiceManagerInstance<P, N>, Error>

Deploys this contract using the given provider and constructor arguments, if any.

Returns a new instance of the contract, if the deployment was successful.

For more fine-grained control over the deployment process, use deploy_builder instead.

Source

pub fn deploy_builder(__provider: P) -> CallBuilder<P, (), N>

Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.

This is a simple wrapper around creating a RawCallBuilder with the data set to the bytecode concatenated with the constructor’s ABI-encoded arguments.

Source

pub const fn address(&self) -> &Address

Returns a reference to the address.

Source

pub fn set_address(&mut self, address: Address)

Sets the address.

Source

pub fn at(self, address: Address) -> IBlueprintServiceManagerInstance<P, N>

Sets the address and returns self.

Source

pub const fn provider(&self) -> &P

Returns a reference to the provider.

Source§

impl<P, N> IBlueprintServiceManagerInstance<&P, N>
where P: Clone,

Source

pub fn with_cloned_provider(self) -> IBlueprintServiceManagerInstance<P, N>

Clones the provider and returns a new instance with the cloned provider.

Source§

impl<P, N> IBlueprintServiceManagerInstance<P, N>
where P: Provider<N>, N: Network,

Function calls.

Source

pub fn call_builder<C>(&self, call: &C) -> CallBuilder<&P, PhantomData<C>, N>
where C: SolCall,

Creates a new call builder using this contract instance’s provider and address.

Note that the call can be any function call, not just those defined in this contract. Prefer using the other methods for building type-safe contract calls.

Source

pub fn canJoin( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<canJoinCall>, N>

Creates a new call builder for the [canJoin] function.

Source

pub fn canLeave( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<canLeaveCall>, N>

Creates a new call builder for the [canLeave] function.

Source

pub fn computeBillAdjustmentBps( &self, serviceId: u64, periodStart: u64, periodEnd: u64, ) -> CallBuilder<&P, PhantomData<computeBillAdjustmentBpsCall>, N>

Creates a new call builder for the [computeBillAdjustmentBps] function.

Source

pub fn forceRemoveAllowsBelowMin( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<forceRemoveAllowsBelowMinCall>, N>

Creates a new call builder for the [forceRemoveAllowsBelowMin] function.

Source

pub fn getAggregationThreshold( &self, serviceId: u64, jobIndex: u8, ) -> CallBuilder<&P, PhantomData<getAggregationThresholdCall>, N>

Creates a new call builder for the [getAggregationThreshold] function.

Source

pub fn getExitConfig( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getExitConfigCall>, N>

Creates a new call builder for the [getExitConfig] function.

Source

pub fn getHeartbeatInterval( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getHeartbeatIntervalCall>, N>

Creates a new call builder for the [getHeartbeatInterval] function.

Source

pub fn getHeartbeatThreshold( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getHeartbeatThresholdCall>, N>

Creates a new call builder for the [getHeartbeatThreshold] function.

Source

pub fn getMinOperatorStake( &self, ) -> CallBuilder<&P, PhantomData<getMinOperatorStakeCall>, N>

Creates a new call builder for the [getMinOperatorStake] function.

Source

pub fn getNonPaymentTerminationPolicy( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getNonPaymentTerminationPolicyCall>, N>

Creates a new call builder for the [getNonPaymentTerminationPolicy] function.

Source

pub fn getRequiredResultCount( &self, serviceId: u64, jobIndex: u8, ) -> CallBuilder<&P, PhantomData<getRequiredResultCountCall>, N>

Creates a new call builder for the [getRequiredResultCount] function.

Source

pub fn getSlashingWindow( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getSlashingWindowCall>, N>

Creates a new call builder for the [getSlashingWindow] function.

Source

pub fn onAggregatedResult( &self, serviceId: u64, job: u8, jobCallId: u64, output: Bytes, signerBitmap: Uint<256, 4>, aggregatedSignature: [Uint<256, 4>; 2], aggregatedPubkey: [Uint<256, 4>; 4], ) -> CallBuilder<&P, PhantomData<onAggregatedResultCall>, N>

Creates a new call builder for the [onAggregatedResult] function.

Source

pub fn onApprove( &self, operator: Address, requestId: u64, stakingPercent: u8, ) -> CallBuilder<&P, PhantomData<onApproveCall>, N>

Creates a new call builder for the [onApprove] function.

Source

pub fn onBlueprintCreated( &self, blueprintId: u64, owner: Address, tangleCore: Address, ) -> CallBuilder<&P, PhantomData<onBlueprintCreatedCall>, N>

Creates a new call builder for the [onBlueprintCreated] function.

Source

pub fn onExitCanceled( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<onExitCanceledCall>, N>

Creates a new call builder for the [onExitCanceled] function.

Source

pub fn onExitScheduled( &self, serviceId: u64, operator: Address, executeAfter: u64, ) -> CallBuilder<&P, PhantomData<onExitScheduledCall>, N>

Creates a new call builder for the [onExitScheduled] function.

Source

pub fn onJobCall( &self, serviceId: u64, job: u8, jobCallId: u64, inputs: Bytes, ) -> CallBuilder<&P, PhantomData<onJobCallCall>, N>

Creates a new call builder for the [onJobCall] function.

Source

pub fn onJobResult( &self, serviceId: u64, job: u8, jobCallId: u64, operator: Address, inputs: Bytes, outputs: Bytes, ) -> CallBuilder<&P, PhantomData<onJobResultCall>, N>

Creates a new call builder for the [onJobResult] function.

Source

pub fn onOperatorJoined( &self, serviceId: u64, operator: Address, exposureBps: u16, ) -> CallBuilder<&P, PhantomData<onOperatorJoinedCall>, N>

Creates a new call builder for the [onOperatorJoined] function.

Source

pub fn onOperatorLeft( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<onOperatorLeftCall>, N>

Creates a new call builder for the [onOperatorLeft] function.

Source

pub fn onRegister( &self, operator: Address, registrationInputs: Bytes, ) -> CallBuilder<&P, PhantomData<onRegisterCall>, N>

Creates a new call builder for the [onRegister] function.

Source

pub fn onReject( &self, operator: Address, requestId: u64, ) -> CallBuilder<&P, PhantomData<onRejectCall>, N>

Creates a new call builder for the [onReject] function.

Source

pub fn onRequest( &self, requestId: u64, requester: Address, operators: Vec<Address>, requestInputs: Bytes, ttl: u64, paymentAsset: Address, paymentAmount: Uint<256, 4>, ) -> CallBuilder<&P, PhantomData<onRequestCall>, N>

Creates a new call builder for the [onRequest] function.

Source

pub fn onServiceInitialized( &self, blueprintId: u64, requestId: u64, serviceId: u64, owner: Address, permittedCallers: Vec<Address>, ttl: u64, ) -> CallBuilder<&P, PhantomData<onServiceInitializedCall>, N>

Creates a new call builder for the [onServiceInitialized] function.

Source

pub fn onServiceTermination( &self, serviceId: u64, owner: Address, ) -> CallBuilder<&P, PhantomData<onServiceTerminationCall>, N>

Creates a new call builder for the [onServiceTermination] function.

Source

pub fn onSlash( &self, serviceId: u64, offender: Bytes, slashPercent: u8, ) -> CallBuilder<&P, PhantomData<onSlashCall>, N>

Creates a new call builder for the [onSlash] function.

Source

pub fn onUnappliedSlash( &self, serviceId: u64, offender: Bytes, slashPercent: u8, ) -> CallBuilder<&P, PhantomData<onUnappliedSlashCall>, N>

Creates a new call builder for the [onUnappliedSlash] function.

Source

pub fn onUnregister( &self, operator: Address, ) -> CallBuilder<&P, PhantomData<onUnregisterCall>, N>

Creates a new call builder for the [onUnregister] function.

Source

pub fn onUpdatePreferences( &self, operator: Address, newPreferences: Bytes, ) -> CallBuilder<&P, PhantomData<onUpdatePreferencesCall>, N>

Creates a new call builder for the [onUpdatePreferences] function.

Source

pub fn queryDeveloperPaymentAddress( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<queryDeveloperPaymentAddressCall>, N>

Creates a new call builder for the [queryDeveloperPaymentAddress] function.

Source

pub fn queryDisputeOrigin( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<queryDisputeOriginCall>, N>

Creates a new call builder for the [queryDisputeOrigin] function.

Source

pub fn queryIsPaymentAssetAllowed( &self, serviceId: u64, asset: Address, ) -> CallBuilder<&P, PhantomData<queryIsPaymentAssetAllowedCall>, N>

Creates a new call builder for the [queryIsPaymentAssetAllowed] function.

Source

pub fn querySlashingOrigin( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<querySlashingOriginCall>, N>

Creates a new call builder for the [querySlashingOrigin] function.

Source

pub fn requiresAggregation( &self, serviceId: u64, jobIndex: u8, ) -> CallBuilder<&P, PhantomData<requiresAggregationCall>, N>

Creates a new call builder for the [requiresAggregation] function.

Source§

impl<P, N> IBlueprintServiceManagerInstance<P, N>
where P: Provider<N>, N: Network,

Event filters.

Source

pub fn event_filter<E>(&self) -> Event<&P, E, N>
where E: SolEvent,

Creates a new event filter using this contract instance’s provider and address.

Note that the type can be any event, not just those defined in this contract. Prefer using the other methods for building type-safe event filters.

Trait Implementations§

Source§

impl<P, N> Clone for IBlueprintServiceManagerInstance<P, N>
where P: Clone, N: Clone,

Source§

fn clone(&self) -> IBlueprintServiceManagerInstance<P, N>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P, N> Debug for IBlueprintServiceManagerInstance<P, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more