OPNet
    Preparing search index...

    Interface IMotoswapRouterContract

    This interface represents the Motoswap router contract. IMotoswapRouterContract

    Contracts

    interface IMotoswapRouterContract {
        address: string | Address;
        get p2opOrTweaked(): string;
        addLiquidity(
            tokenA: Address,
            tokenB: Address,
            amountADesired: bigint,
            amountBDesired: bigint,
            amountAMin: bigint,
            amountBMin: bigint,
            to: Address,
            deadline: bigint,
        ): Promise<
            CallResult<
                { amountA: bigint; amountB: bigint; liquidity: bigint },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        currentGasParameters(): Promise<BlockGasParameters>;
        decodeEvent(event: NetEvent): OPNetEvent;
        decodeEvents(events: ContractEvents | NetEvent[]): OPNetEvent<{}>[];
        deployer(): Promise<
            CallResult<
                { deployer: Address },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        encodeCalldata(method: string, ...args: unknown[]): Buffer;
        factory(): Promise<
            CallResult<
                { factory: Address },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        getAmountIn(
            amountOut: bigint,
            reserveIn: bigint,
            reserveOut: bigint,
        ): Promise<
            CallResult<
                { amountIn: bigint },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        getAmountOut(
            amountIn: bigint,
            reserveIn: bigint,
            reserveOut: bigint,
        ): Promise<
            CallResult<
                { amountOut: bigint },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        getAmountsIn(
            amountOut: bigint,
            path: Address[],
        ): Promise<
            CallResult<
                { amountsIn: bigint[] },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        getAmountsOut(
            amountIn: bigint,
            path: Address[],
        ): Promise<
            CallResult<
                { amountsOut: bigint[] },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        quote(
            amountA: bigint,
            reserveA: bigint,
            reserveB: bigint,
        ): Promise<
            CallResult<
                { quote: bigint },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        removeLiquidity(
            tokenA: Address,
            tokenB: Address,
            liquidity: bigint,
            amountAMin: bigint,
            amountBMin: bigint,
            to: Address,
            deadline: bigint,
        ): Promise<
            CallResult<
                { amountA: bigint; amountB: bigint },
                OPNetEvent<ContractDecodedObjectResult>[],
            >,
        >;
        setAccessList(accessList: IAccessList): void;
        setSender(sender: Address): void;
        setSimulatedHeight(height: undefined | bigint): void;
        setTransactionDetails(tx: ParsedSimulatedTransaction): void;
        swapExactTokensForTokensSupportingFeeOnTransferTokens(
            amountIn: bigint,
            amountOutMin: bigint,
            path: Address[],
            to: Address,
            deadline: bigint,
        ): Promise<CallResult<{}, OPNetEvent<ContractDecodedObjectResult>[]>>;
        [key: symbol]: CallResult<{}, OPNetEvent<ContractDecodedObjectResult>[]>;
    }

    Hierarchy (View Summary)

    Indexable

    Index

    Properties

    address: string | Address

    Accessors

    Methods

    • Parameters

      • tokenA: Address
      • tokenB: Address
      • amountADesired: bigint
      • amountBDesired: bigint
      • amountAMin: bigint
      • amountBMin: bigint
      • to: Address
      • deadline: bigint

      Returns Promise<
          CallResult<
              { amountA: bigint; amountB: bigint; liquidity: bigint },
              OPNetEvent<ContractDecodedObjectResult>[],
          >,
      >

      • Returns (amountA) u256, (amountB) u256, (liquidity) u256

      Add liquidity to the pool.