Effects

Effects are any side effects that need to be handled asynchronously. For example if a user provides a bounty for the execution of a specific action, the bounty will be placed into an Effect that is released as soon as someone executes the Effect and provides the required proof of execution necessary to release the funds. This can be something like a limit order, where an Effect is created with some expiry to buy an asset at a specific price, and the Effect is only finalized when the limit order is executed.

More to follow on Effects, but they greatly expand the usability of the protocol beyond a single chain.

struct Effect {
    bytes32 id;
    uint256 index;
    bytes32 targetChain;
    bytes32 ownerId;
    bytes32 descriptor; // describes the type of the effect
    bytes args;
    bytes bounty;
    EffectStatus status;
}

enum EffectStatus {
    PENDING,
    COMPLETED,
    CANCELLED
}

Last updated