@shogun-sdk/money-legos
Version:
Shogun Money Legos: clients and types for quotes, memes, prices, balances, fees, validations, etc.
27 lines (24 loc) • 926 B
text/typescript
export enum ExternalCallType {
EVM = 'evm',
}
export type EvmExternalCall = {
type: ExternalCallType.EVM;
// call target
to: `0x${string}`;
// encoded calldata
data: `0x${string}`;
// allow external call to be failed. In case failure tokens will be sent to `fallbackAddress`
allowFailure: boolean;
// tokens will be sent to fallBack address in case of call failure
// or if some tokens left on the contract after "approve_and_call" call
// if not passed
// `dstChainOrderAuthorityAddress` will be used instead for the bridge transaction
// `senderAddress` will be used instead for the single chain swap transaction
fallbackAddress?: `0x${string}`;
// choose to either approve tokens to CallHandler smart contract and call or transfer and call
// more comments in ExternalCallMode enum
mode: ExternalCallMode;
};
export enum ExternalCallMode {
ApproveAndCall = 'approve_and_call',
}