code.vegaprotocol.io/vega@v0.79.0/protos/sources/vega/chain_events.proto (about)

     1  syntax = "proto3";
     2  
     3  package vega;
     4  
     5  option go_package = "code.vegaprotocol.io/vega/protos/vega";
     6  
     7  // Heartbeat represents that the ERC20 bridge is being watched even though no events happened.
     8  message ERC20Heartbeat {
     9    // Contract address that is being listened to
    10    string contract_address = 1;
    11    // Last Ethereum block height that was checked for events
    12    uint64 block_height = 2;
    13    // Ethereum block time in Unix seconds.
    14    uint64 block_time = 3;
    15    // Source chain for this chain event.
    16    string source_chain_id = 6;
    17  }
    18  
    19  // Result of calling an arbitrary Ethereum contract method
    20  message EthContractCallEvent {
    21    // ID of the data source spec that triggered this contract call.
    22    string spec_id = 1;
    23    // Ethereum block height.
    24    uint64 block_height = 2;
    25    // Ethereum block time in Unix seconds.
    26    uint64 block_time = 3;
    27    // Result of contract call, packed according to the ABI stored in the associated data source spec.
    28    bytes result = 4;
    29    // Error message if the call failed.
    30    optional string error = 5;
    31    // Source chain for this chain event.
    32    optional uint64 source_chain_id = 6;
    33    // If true the event does not correspond to a contract call and is only a notification to core of the last checked block height.
    34    bool heartbeat = 7;
    35  }
    36  
    37  // Deposit for a Vega built-in asset
    38  message BuiltinAssetDeposit {
    39    // Vega network internal asset ID.
    40    string vega_asset_id = 1;
    41    // Vega party ID i.e. public key.
    42    string party_id = 2;
    43    // Amount to be deposited. This field is an unsigned integer scaled to the asset's decimal places.
    44    string amount = 3;
    45  }
    46  
    47  // Withdrawal for a Vega built-in asset
    48  message BuiltinAssetWithdrawal {
    49    // Vega network internal asset ID.
    50    string vega_asset_id = 1;
    51    // Vega network party ID i.e. public key.
    52    string party_id = 2;
    53    // The amount to be withdrawn. This field is an unsigned integer scaled to the asset's decimal places.
    54    string amount = 3;
    55  }
    56  
    57  // Event related to a Vega built-in asset
    58  message BuiltinAssetEvent {
    59    oneof action {
    60      // Built-in asset deposit.
    61      BuiltinAssetDeposit deposit = 1001;
    62      // Built-in asset withdrawal.
    63      BuiltinAssetWithdrawal withdrawal = 1002;
    64    }
    65  }
    66  
    67  // Asset allow-listing for an ERC20 token
    68  message ERC20AssetList {
    69    // Vega network internal asset ID.
    70    string vega_asset_id = 1;
    71    // Ethereum address of the asset.
    72    string asset_source = 2;
    73  }
    74  
    75  // Asset deny-listing for an ERC20 token
    76  message ERC20AssetDelist {
    77    // Vega network internal asset ID.
    78    string vega_asset_id = 1;
    79  }
    80  
    81  message ERC20AssetLimitsUpdated {
    82    // Vega network internal asset ID.
    83    string vega_asset_id = 1;
    84    // Ethereum wallet that initiated the deposit.
    85    string source_ethereum_address = 2;
    86    // Updated lifetime limits.
    87    string lifetime_limits = 3;
    88    // Updated withdrawal threshold.
    89    string withdraw_threshold = 4;
    90  }
    91  
    92  // Asset deposit for an ERC20 token
    93  message ERC20Deposit {
    94    // Vega network internal asset ID.
    95    string vega_asset_id = 1;
    96    // Ethereum wallet that initiated the deposit.
    97    string source_ethereum_address = 2;
    98    // Vega party ID i.e. public key that is the target of the deposit.
    99    string target_party_id = 3;
   100    // Amount to be deposited.
   101    string amount = 4;
   102  }
   103  
   104  // Asset withdrawal for an ERC20 token
   105  message ERC20Withdrawal {
   106    // Vega network internal asset ID.
   107    string vega_asset_id = 1;
   108    // Target Ethereum wallet address.
   109    string target_ethereum_address = 2;
   110    // Reference nonce used for the transaction.
   111    string reference_nonce = 3;
   112  }
   113  
   114  // Event related to an ERC20 token
   115  message ERC20Event {
   116    // Index of the log in the transaction.
   117    uint64 index = 1;
   118    // Block in which the transaction was added.
   119    uint64 block = 2;
   120    // ID of the source chain for this event.
   121    string chain_id = 3;
   122  
   123    // Action undertaken as a result of the event.
   124    oneof action {
   125      // List an ERC20 asset.
   126      ERC20AssetList asset_list = 1001;
   127      // De-list an ERC20 asset.
   128      ERC20AssetDelist asset_delist = 1002;
   129      // Deposit ERC20 asset.
   130      ERC20Deposit deposit = 1003;
   131      // Withdraw ERC20 asset.
   132      ERC20Withdrawal withdrawal = 1004;
   133      // Update an ERC20 asset.
   134      ERC20AssetLimitsUpdated asset_limits_updated = 1005;
   135      // Bridge operations has been stopped.
   136      bool bridge_stopped = 1006;
   137      // Bridge operations has been resumed.
   138      bool bridge_resumed = 1007;
   139    }
   140  }
   141  
   142  // New signer added to the ERC20 bridge
   143  message ERC20SignerAdded {
   144    // Ethereum address of the new signer
   145    string new_signer = 1;
   146    // Nonce created by the Vega network used for this new signer
   147    string nonce = 2;
   148    // Time at which the block was produced
   149    // will be used to inform the core at what time
   150    // the stake was made unavailable.
   151    int64 block_time = 3;
   152  }
   153  
   154  // Signer removed from the ERC20 bridge
   155  message ERC20SignerRemoved {
   156    // Ethereum address of the old signer
   157    string old_signer = 1;
   158    // Nonce created by the Vega network used for this old signer
   159    string nonce = 2;
   160    // Time at which the block was produced.
   161    // Will be used to inform the core at what time
   162    // the stake was made unavailable.
   163    int64 block_time = 3;
   164  }
   165  
   166  // Threshold has been updated on the multisig control
   167  message ERC20ThresholdSet {
   168    // New threshold value to set
   169    uint32 new_threshold = 1;
   170    // Nonce created by the Vega network
   171    string nonce = 2;
   172    // Time at which the block was produced.
   173    // Will be used to inform the core at what time
   174    // the stake was made unavailable.
   175    int64 block_time = 3;
   176  }
   177  
   178  // Event related to the ERC20 MultiSig
   179  message ERC20MultiSigEvent {
   180    // Index of the log in the transaction
   181    uint64 index = 1;
   182    // Block in which the transaction was added
   183    uint64 block = 2;
   184    // ID of the source chain for this event.
   185    string chain_id = 3;
   186  
   187    // Action undertaken as a result of the event.
   188    oneof action {
   189      // Add a signer to the erc20 bridge
   190      ERC20SignerAdded signer_added = 1001;
   191      // Remove a signer from the erc20 bridge
   192      ERC20SignerRemoved signer_removed = 1002;
   193      // Threshold set
   194      ERC20ThresholdSet threshold_set = 1003;
   195    }
   196  }
   197  
   198  // Event related to staking on the Vega network.
   199  message StakingEvent {
   200    // Index of the log in the transaction.
   201    uint64 index = 1;
   202    // Block in which the transaction was added.
   203    uint64 block = 2;
   204    // Action undertaken by the event.
   205    oneof action {
   206      StakeDeposited stake_deposited = 1001;
   207      StakeRemoved stake_removed = 1002;
   208      StakeTotalSupply total_supply = 1003;
   209    }
   210  }
   211  
   212  message StakeDeposited {
   213    // Ethereum Address of the user depositing stake (hex encode with 0x prefix)
   214    string ethereum_address = 1;
   215    // Hex encoded public key of the party receiving the stake deposit.
   216    string vega_public_key = 2;
   217    // Amount deposited as an unsigned base 10 integer scaled to the asset's decimal places.
   218    string amount = 3;
   219    // Time at which the block was produced.
   220    // Will be used to inform the core at what time
   221    // the stake started to be available.
   222    int64 block_time = 4;
   223  }
   224  
   225  message StakeRemoved {
   226    // Ethereum address of the user removing stake. This should be hex encoded with 0x prefix.
   227    string ethereum_address = 1;
   228    // Hex encoded public key of the party from which to remove stake.
   229    string vega_public_key = 2;
   230    // Amount removed as a base 10 unsigned integer scaled to the asset's decimal places.
   231    string amount = 3;
   232    // The time at which the block was produced
   233    // will be used to inform the core at what time
   234    // the stake was made unavailable.
   235    int64 block_time = 4;
   236  }
   237  
   238  message StakeTotalSupply {
   239    // Address of the staking asset
   240    string token_address = 1;
   241    // Total supply observed for the token as an unsigned based 10 integer scaled to the asset's decimal places.
   242    string total_supply = 2;
   243  }