Created
May 29, 2025 07:46
-
-
Save olegpetroveth/89ec1da0c279b7d18a0a953f682240e3 to your computer and use it in GitHub Desktop.
SwapKit Tracker Transaction types and stages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum TxnType { | |
approve = "approve", // token approve | |
claim = "claim", // claim rewards, claim tokens, etc. | |
deposit = "deposit", // msgDeposit and related cosmos operations, not deposit to vault or deposit contract name | |
lending = "lending", // lending operations | |
lp_action = "lp_action", // deposit to an evm pool, tc pool, etc. | |
native_contract_call = "native_contract_call", // native contract call | |
native_send = "native_send", // native send, msgSend, etc. | |
stake = "stake", // defi operations like $vthor and other types of staking | |
unstake = "unstake", // defi operations like $vthor and other types of unstaking | |
streaming_swap = "streaming_swap", // streaming swap | |
swap = "swap", // any kind of operations that involves swapping assets | |
thorname_action = "thorname_action", // should we use this or msgDeposit? | |
token_contract_call = "token_contract_call", // token contract call | |
token_transfer = "token_transfer", // token transfer | |
unknown = "unknown", | |
donate = "donate", // thorchain donation | |
} | |
// transaction status devoid of any business logic | |
export enum TxnStatus { | |
unknown = "unknown", | |
not_started = "not_started", | |
pending = "pending", | |
swapping = "swapping", | |
completed = "completed", | |
refunded = "refunded", | |
failed = "failed", | |
} | |
// "tracking status" with business logic context | |
export enum TrackingStatus { | |
not_started = "not_started", | |
starting = "starting", // first status once we receive, old or new transaction | |
broadcasted = "broadcasted", | |
mempool = "mempool", // or indexing | |
inbound = "inbound", | |
outbound = "outbound", | |
swapping = "swapping", // more generic than streaming | |
completed = "completed", | |
refunded = "refunded", | |
partially_refunded = "partially_refunded", | |
dropped = "dropped", | |
reverted = "reverted", | |
replaced = "replaced", | |
retries_exceeded = "retries_exceeded", | |
parsing_error = "parsing_error", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment