UNPKG

ulysses-sdk

Version:

An sdk for interacting with the Ulysses contracts

31 lines (30 loc) 1.89 kB
import { Interface } from '@ethersproject/abi'; import { IRedeemSettlementParams, IRetrieveSettlementParams, IRootBridgeRetrySettlementParams } from '../../types'; export declare abstract class RootBridgeAgent { static readonly INTERFACE: Interface; private constructor(); /** * Used to retry call a function on a remote chain. * @param gasRefundee The address that will receive the gas refund. * @param recipient The address that will receive the tokens. * @param dstChainId The chain id of the destination chain. * @param params The encoded parameters to pass to the remote chain. * @param gasParams params that hold information about the gasLimit and remoteBranchExecutionGas. * @returns encoded calldata for the callOut function */ static encodeRetrySettlementCalldata({ settlementOwnerAndGasRefundee, settlementNonce, recipient, params, gasParams, hasFallbackToggled, }: IRootBridgeRetrySettlementParams): string; /** * Used to request tokens back to the root chain after an call fails. * @param depositNonce The nonce of the settlement to retrieve. * @param gasParams params that hold information about the gasLimit and remoteBranchExecutionGas * @returns encoded calldata for the retrieveSettlement function */ static encodeRetrieveSettlementCalldata({ settlementNonce, gasParams }: IRetrieveSettlementParams): string; /** * Used to transfer tokens from the root port to the owner of the settlement after an call fails. * @param depositNonce The nonce of the settlement to retrieve. * @param recipient the address that's used for receive the redeemed tokens. * @returns encoded calldata for the redeemSettlement function */ static encodeRedeemSettlementCalldata({ settlementNonce, recipient }: IRedeemSettlementParams): string; }