Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
gnomadic authored and github-actions[bot] committed Feb 2, 2024
1 parent 1a6d9d1 commit d83370e
Showing 1 changed file with 88 additions and 88 deletions.
176 changes: 88 additions & 88 deletions src/actions/types.ts
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
import type { FilterOperator, TransactionFilter } from "../filter/types.js";
import type { PluginActionNotImplementedError } from "../index.js";
import { type Address } from "viem";
import type { FilterOperator, TransactionFilter } from '../filter/types.js'
import type { PluginActionNotImplementedError } from '../index.js'
import { type Address } from 'viem'

export type SwapActionParams = {
chainId: number;
contractAddress?: Address;
tokenIn?: Address;
tokenOut?: Address;
amountIn?: bigint | FilterOperator;
amountOut?: bigint | FilterOperator;
recipient?: Address;
deadline?: bigint | FilterOperator;
};
chainId: number
contractAddress?: Address
tokenIn?: Address
tokenOut?: Address
amountIn?: bigint | FilterOperator
amountOut?: bigint | FilterOperator
recipient?: Address
deadline?: bigint | FilterOperator
}

export type OptionsActionParams = {
chainId: number;
contractAddress?: Address;
token?: Address;
amount?: bigint | FilterOperator;
recipient?: Address;
orderType?: OrderType;
};
chainId: number
contractAddress?: Address
token?: Address
amount?: bigint | FilterOperator
recipient?: Address
orderType?: OrderType
}

export type StakeActionParams = {
chainId: number;
contractAddress?: Address;
tokenOne?: Address;
amountOne?: bigint | FilterOperator;
tokenTwo?: Address;
amountTwo?: bigint | FilterOperator;
duration?: bigint | FilterOperator;
};
chainId: number
contractAddress?: Address
tokenOne?: Address
amountOne?: bigint | FilterOperator
tokenTwo?: Address
amountTwo?: bigint | FilterOperator
duration?: bigint | FilterOperator
}

export type BridgeActionParams = {
sourceChainId: number;
destinationChainId: number;
contractAddress?: Address;
tokenAddress?: Address;
amount?: bigint | FilterOperator;
recipient?: Address;
};
sourceChainId: number
destinationChainId: number
contractAddress?: Address
tokenAddress?: Address
amount?: bigint | FilterOperator
recipient?: Address
}

export type MintActionParams = {
chainId: number;
contractAddress: Address;
tokenId?: number;
amount?: number | FilterOperator;
recipient?: Address;
};
chainId: number
contractAddress: Address
tokenId?: number
amount?: number | FilterOperator
recipient?: Address
}

export type BurnActionParams = MintActionParams;
export type BurnActionParams = MintActionParams

export type QuestActionParams = {
chainId: number;
rewardToken?: Address;
rewardAmount?: bigint | FilterOperator;
startTime?: bigint | FilterOperator;
endTime?: bigint | FilterOperator;
totalParticipants?: bigint | FilterOperator;
actionSpec?: string;
};
chainId: number
rewardToken?: Address
rewardAmount?: bigint | FilterOperator
startTime?: bigint | FilterOperator
endTime?: bigint | FilterOperator
totalParticipants?: bigint | FilterOperator
actionSpec?: string
}

export type DelegateActionParams = {
chainId: number;
delegate?: Address;
project: Address | string;
contractAddress?: Address;
amount?: bigint | FilterOperator;
delegator?: Address;
};
chainId: number
delegate?: Address
project: Address | string
contractAddress?: Address
amount?: bigint | FilterOperator
delegator?: Address
}

export type VoteActionParams = {
chainId: number;
project: Address | string;
support?: bigint | boolean | FilterOperator;
proposalId?: bigint | FilterOperator;
};
chainId: number
project: Address | string
support?: bigint | boolean | FilterOperator
proposalId?: bigint | FilterOperator
}

export type ActionParams =
| SwapActionParams
Expand All @@ -85,59 +85,59 @@ export type ActionParams =
| DelegateActionParams
| QuestActionParams
| OptionsActionParams
| VoteActionParams;
| VoteActionParams
export interface IActionPlugin {
pluginId: string;
getSupportedChainIds: (task?: ActionType) => Promise<number[]>;
pluginId: string
getSupportedChainIds: (task?: ActionType) => Promise<number[]>
getSupportedTokenAddresses: (
chainId: number,
task?: ActionType,
) => Promise<Address[]>;
) => Promise<Address[]>
bridge?: (
params: BridgeActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
swap?: (
params: SwapActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
mint?: (
params: MintActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
stake?: (
params: StakeActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
delegate?: (
params: DelegateActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
burn?: (
params: BurnActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
quest?: (
params: QuestActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
options?: (
params: OptionsActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
vote?: (
params: VoteActionParams,
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>;
) => Promise<TransactionFilter> | Promise<PluginActionNotImplementedError>
}

export enum ActionType {
Bridge = "bridge",
Stake = "stake",
Swap = "swap",
Mint = "mint",
Burn = "burn",
Quest = "quest",
Deposit = "deposit",
Delegate = "delegate",
Lend = "lend",
Other = "other",
Options = "options",
Vote = "vote",
Bridge = 'bridge',
Stake = 'stake',
Swap = 'swap',
Mint = 'mint',
Burn = 'burn',
Quest = 'quest',
Deposit = 'deposit',
Delegate = 'delegate',
Lend = 'lend',
Other = 'other',
Options = 'options',
Vote = 'vote',
}

export enum OrderType {
Limit = "limit",
Market = "market",
Limit = 'limit',
Market = 'market',
}

0 comments on commit d83370e

Please sign in to comment.