github.com/status-im/status-go@v1.1.0/services/wallet/router/pathprocessor/proto_cbridge/cbridge.proto (about)

     1  syntax = "proto3";
     2  package cbridge;
     3  
     4  option go_package = "../cbridge";
     5  
     6  // ========== x/cbridge kv value types
     7  // for src transfer id
     8  // normal status flow: after sgn applied user's Send event, status is OK_TO_RELAY. then after apply Relay event
     9  // status is SUCCESS
    10  // can't relay flow: after apply send, status will be BAD_xxx, and there'll be no relay. so user need to InitWithdraw, status becomes
    11  // refund_requested when sgn apply withdrawDone event, status becomes REFUND_DONE
    12  enum XferStatus {
    13    UNKNOWN = 0;  // use as default for unknown xfer
    14    // normal flow only has ok then success
    15    OK_TO_RELAY = 1;  // x/cbridge emit relay, waiting for sgn nodes to send sig, then sgn will submit relay tx onchain
    16    SUCCESS = 2;      // applied onchain relay event
    17  
    18    // can't relay flow status
    19    BAD_LIQUIDITY = 3;  // can't complete xfer due to low dst chain liquidity or equal value dest amount is 0
    20    BAD_SLIPPAGE = 4;   // slippage larger than user specified max
    21    BAD_TOKEN = 5;      // src or dest token are not supported
    22  
    23    // refund, using withdraw flow
    24    REFUND_REQUESTED = 6;   // user/gateway called InitWithdraw, XferRefundKey has withdraw seq num
    25    REFUND_DONE = 7;        // applied onchain WithdrawDown event
    26    BAD_XFER_DISABLED = 8;  // asset is in config, but it is xfer_disabled, so this asset should not be used for transfer. If any transfer
    27                            // come, we should go to refund flow.
    28    BAD_DEST_CHAIN = 9;     // dest chain is same to src chain, relayer will ignore it.
    29  
    30    EXCEED_MAX_OUT_AMOUNT = 10;  // amount larger than max out allowance
    31    XFER_DELAYED = 11;  // relayer has successfully called onchain relay() but the onchain contract decides that the amt is greater than its
    32                        // delayThreshold
    33    BAD_ADDRESS = 12;
    34  }