import ConditionalTransactionDelegateTarget from "@counterfactual/cf-funding-protocol-contracts/expected-build-artifacts/ConditionalTransactionDelegateTarget.json" ; import { NetworkContext } from "@counterfactual/types" ; import { Interface } from "ethers/utils" ; import { MultisigCommitment } from "./multisig-commitment" ; import { MultisigOperation } from "./types" ; const iface = new Interface ( ConditionalTransactionDelegateTarget . abi ) ; class extends MultisigCommitment export class ConditionalTransaction extends MultisigCommitment { constructor ( public readonly networkContext , public readonly multisig , public readonly multisigOwners , public readonly appIdentityHash , public readonly freeBalanceAppIdentityHash , public readonly interpreterAddr , public readonly interpreterParams ) { super ( multisig , multisigOwners ) ; } returns memberof public getTransactionDetails ( ) { return { to : this . networkContext . ConditionalTransactionDelegateTarget , value : 0 , data : iface . functions . executeEffectOfInterpretedAppOutcome . encode ( [ this . networkContext . ChallengeRegistry , this . freeBalanceAppIdentityHash , this . appIdentityHash , this . interpreterAddr , this . interpreterParams ] ) , operation : MultisigOperation . DelegateCall } ; } }