pub trait Agreement<AccountId> {
    type Technical: Parameter;
    type Economical: Parameter;

    // Required methods
    fn technical(&self) -> Self::Technical;
    fn economical(&self) -> Self::Economical;
    fn promisee(&self) -> AccountId;
    fn promisor(&self) -> AccountId;
    fn verify(&self) -> bool;
}
Expand description

Agreement between two participants around technical/economical aspects.

Required Associated Types§

source

type Technical: Parameter

Technical parameter of agreement. Usually in this parameter one party of agreement provide technical information like task description, parameters and some additional data.

source

type Economical: Parameter

Economical parameter of agreement. Usually in this parameter one party set task cost for another party. To come an agreement both parties should be agree with this parameter.

Required Methods§

source

fn technical(&self) -> Self::Technical

Get techincal parameter of agreement.

source

fn economical(&self) -> Self::Economical

Get Economical parameter of agreement.

source

fn promisee(&self) -> AccountId

The client account.

source

fn promisor(&self) -> AccountId

The executive account.

source

fn verify(&self) -> bool

Check validity of agreement params proof.

Implementors§

source§

impl<T, E, A, V, I> Agreement<I> for SignedAgreement<T, E, I, V>where A: IdentifyAccount<AccountId = I>, V: Verify<Signer = A> + Parameter, I: Parameter, T: Parameter, E: Parameter,

§

type Technical = T

§

type Economical = E