Skip to content

FundingSourceEarn.from

Creates an Earn source for funding, policy rules, or discovery.

The source address identifies a deployed Earn funding source. Caps apply per invocation.

Imports

Named
import { FundingSourceEarn } from 'ox/tempo'

Examples

import { FundingSourceEarn } from 'ox/tempo'
 
FundingSourceEarn.from({
  maxValueIn: 50_000_000n,
  source: '0x0202020202020202020202020202020202020202',
  vault: '0x0101010101010101010101010101010101010101',
})

Definition

function from<source>(
  request: from.Parameters<source>,
): {
    data: `0x${string}`;
    to: source;
}

Source: src/tempo/FundingSourceEarn.ts

Parameters

request

  • Type: from.Parameters<source>

request.maxAmountIn

  • Type: bigint
  • Optional

EarnShare input cap in base units. Omission is unlimited; zero permits no input.

request.maxValueIn

  • Type: bigint
  • Optional

Gross underlying-token value cap in base units, before exit fees. Omission is unlimited; zero permits no input.

request.source

  • Type: source

Deployed Earn funding source address.

request.vault

  • Type: abitype_Address

Earn vault whose shares are redeemed.

Return Type

{ data: 0x${string}; to: source; }