Custom Contract Calls
The ContractCall object
interface ContractCall {
callType: ContractCallType; // how to handle amounts
target: string; // contract to call
value: string; // native value in wei (usually "0")
callData: string; // ABI-encoded function call
payload: string; // extra data for balance encoding
}import { SwapperIframe, ContractCallType } from "@swapper-finance/deposit-sdk";
const swapper = new SwapperIframe({
integratorId: "your-id",
dstChainId: "1",
dstTokenAddr: "0x…", // token the calls operate on
depositWalletAddress: "0x…",
customContractCalls: [ /* calls */ ],
});Call types
Type
Value
Behavior
Balance payload encoding
ERC-20 helpers
Worked example: swap → stake → return receipt
Updating calls at runtime
Guidelines
Last updated