Make an offer to another contract instance (labeled contractB below), withdrawing the payments for the offer from a seat in the current contract instance (contractA) and depositing the payouts in another seat in the current contract instance (contractA).

  • Type Parameters

    • Args extends unknown

      Offer args

    • Result extends unknown

      Offer result

    Parameters

    • zcf: ZCF<Record<string, unknown>>

      Zoe Contract Facet for contractA

    • invitation: ERef<Invitation<Result, Args>>

      Invitation to contractB

    • keywordMapping: undefined | KeywordKeywordRecord

      Mapping of keywords used in contractA to keywords to be used in contractB. Note that the pathway to deposit the payout back to contractA reverses this mapping.

    • proposal: Partial<ProposalRecord>

      The proposal for the offer to be made to contractB

    • fromSeat: ZCFSeat

      The seat in contractA to take the offer payments from.

    • OptionaltoSeat: ZCFSeat

      The seat in contractA to deposit the payout of the offer to. If toSeat is not provided, this defaults to the fromSeat.

    • OptionalofferArgs: Args

      Additional contract-specific optional arguments in a record.

    Returns Promise<{
        deposited: Promise<AmountKeywordRecord>;
        userSeatPromise: Promise<UserSeat<Result>>;
    }>

    A promise for the userSeat for the offer to the other contract, and a promise (deposited) which resolves when the payout for the offer has been deposited to the toSeat. Any failures of the invitation will be returned by userSeatPromise.getOfferResult().