FeeProxy affiliate profile
API for @0xintuition/sdk@4.1.0. Compatibility · Source.
Import from @0xintuition/sdk/actions.
Signatures show the exact accepted inputs and return types. Named input/output structures and dependency-injection types are listed below; viem and protocol types come from their respective packages. Preparation and quote functions can perform RPC reads. Envelope builders on the action-envelope pages use caller-supplied read context and perform no RPC reads or signing. feeProxyExecutePlan sends transactions; the other SDK actions on these pages prepare transactions or read data.
feeProxyGetAffiliateProfile
Reads everything a builder dashboard shows for one affiliate in one batched read: the registry row (fees, fee recipient, registration time, pause flag), whether it is active, its aggregate stats, the protocol caps and the registration fee. Uses the chain's Multicall3 (or the canonical address); when the batch is unavailable or any leg fails it falls back to individual reads.
function feeProxyGetAffiliateProfile(
config: ReadConfig,
inputs: {
affiliate: Address;
},
): Promise<FeeProxyAffiliateProfile>;
config: FeeProxy address and public client.inputs: The affiliate to profile.- returns: The normalised profile: raw fees, fees as percentages, and headroom against the caps.
Imported type provenance
Public import locations and the definitions used by these signatures and helper types. Value imports appear where a dependency hook uses typeof.
| Name in this module | Public import | Definition |
|---|---|---|
FeeConfig | import type { FeeConfig } from '@0xintuition/periphery' | Source definition |
FeeProxyAbi | import { FeeProxyAbi } from '@0xintuition/periphery' | Source definition |
ReadConfig | import type { ReadConfig } from '@0xintuition/periphery' | Source definition |
Address | import type { Address } from 'viem' | Owned by the external package. |
ContractFunctionReturnType | import type { ContractFunctionReturnType } from 'viem' | Owned by the external package. |
Supporting input and result structures
These declarations retain their owning source links. Internal supporting types describe accepted shapes but are not standalone public imports.
FeeConfig
export type FeeConfig = {
depositBps: bigint;
creationBps: bigint;
depositFixedFee: bigint;
creationFixedFee: bigint;
};
ReadConfig
export type ReadConfig = {
address: Address;
publicClient: PublicClient;
};
Input and result types
Exported declarations are public imports from the SDK subpath above. Module-local helper aliases describe accepted shapes but are not public exports.
FeeProxyAffiliateStats
Public export.
export type FeeProxyAffiliateStats = ContractFunctionReturnType<
typeof FeeProxyAbi,
'view',
'affiliateStats'
>;
FeeProxyFeeHeadroom
Public export.
export type FeeProxyFeeHeadroom = {
depositBps: bigint;
creationBps: bigint;
depositFixedFee: bigint;
creationFixedFee: bigint;
};
FeeProxyAffiliateProfile
Public export.
export type FeeProxyAffiliateProfile = {
affiliate: Address;
registered: boolean;
/** Registered and not row-paused: the condition every routing call checks. */
active: boolean;
paused: boolean;
/** Unix seconds; zero when unregistered. */
registeredAt: bigint;
feeRecipient: Address;
fees: FeeConfig;
/** The bps fields as percentages, for display (`250n` bps is `2.5`). */
feePercent: { deposit: number; creation: number };
caps: { maxFeeBps: bigint; maxFixedFee: bigint; maxFeePercent: number };
headroom: FeeProxyFeeHeadroom;
/**
* Whether each side's row is within the current protocol caps. Routing on a side that is over
* the cap reverts until the affiliate lowers its fees.
*/
withinCaps: { deposit: boolean; creation: boolean };
registrationFee: bigint;
stats: FeeProxyAffiliateStats;
};
AffiliateProfileReads
Module-local helper; not a public export.
type AffiliateProfileReads = {
config: ContractFunctionReturnType<
typeof FeeProxyAbi,
'view',
'affiliateConfig'
>;
active: boolean;
stats: FeeProxyAffiliateStats;
maxFeeBps: bigint;
maxFixedFee: bigint;
registrationFee: bigint;
};
Applies to V2 · @0xintuition/sdk 4.1.0