Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #447 from vegaprotocol/feat/chainevent
Browse files Browse the repository at this point in the history
Add ERC20AssetLimitsUpdated chain event
  • Loading branch information
jeremyletang committed May 26, 2022
2 parents 0d8bb62 + 6d94ca0 commit f303ea3
Show file tree
Hide file tree
Showing 5 changed files with 427 additions and 162 deletions.
29 changes: 29 additions & 0 deletions generated/json/vega/ERC20AssetLimitsUpdated.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/ERC20AssetLimitsUpdated",
"definitions": {
"ERC20AssetLimitsUpdated": {
"properties": {
"vega_asset_id": {
"type": "string",
"description": "The Vega network internal identifier of the asset"
},
"source_ethereum_address": {
"type": "string",
"description": "The Ethereum wallet that initiated the deposit"
},
"lifetime_limits": {
"type": "string",
"description": "The updated lifetime limits"
},
"withdraw_threshold": {
"type": "string",
"description": "The updated withdraw threshold"
}
},
"additionalProperties": true,
"type": "object",
"title": "ERC 20 Asset Limits Updated"
}
}
}
28 changes: 28 additions & 0 deletions generated/json/vega/ERC20Event.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"$ref": "#/definitions/vega.ERC20Withdrawal",
"additionalProperties": true,
"description": "Withdraw ERC20 asset"
},
"asset_limits_updated": {
"$ref": "#/definitions/vega.ERC20AssetLimitsUpdated",
"additionalProperties": true,
"description": "Update an ERC20 asset"
}
},
"additionalProperties": true,
Expand All @@ -50,6 +55,29 @@
"title": "ERC 20 Asset Delist",
"description": "An asset deny-listing for an ERC20 token"
},
"vega.ERC20AssetLimitsUpdated": {
"properties": {
"vega_asset_id": {
"type": "string",
"description": "The Vega network internal identifier of the asset"
},
"source_ethereum_address": {
"type": "string",
"description": "The Ethereum wallet that initiated the deposit"
},
"lifetime_limits": {
"type": "string",
"description": "The updated lifetime limits"
},
"withdraw_threshold": {
"type": "string",
"description": "The updated withdraw threshold"
}
},
"additionalProperties": true,
"type": "object",
"title": "ERC 20 Asset Limits Updated"
},
"vega.ERC20AssetList": {
"properties": {
"vega_asset_id": {
Expand Down
72 changes: 72 additions & 0 deletions generated/proto.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,66 @@
}
]
},
{
"name": "ERC20AssetLimitsUpdated",
"longName": "ERC20AssetLimitsUpdated",
"fullName": "vega.ERC20AssetLimitsUpdated",
"description": "",
"hasExtensions": false,
"hasFields": true,
"hasOneofs": false,
"extensions": [],
"fields": [
{
"name": "vega_asset_id",
"description": "The Vega network internal identifier of the asset",
"label": "",
"type": "string",
"longType": "string",
"fullType": "string",
"ismap": false,
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
},
{
"name": "source_ethereum_address",
"description": "The Ethereum wallet that initiated the deposit",
"label": "",
"type": "string",
"longType": "string",
"fullType": "string",
"ismap": false,
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
},
{
"name": "lifetime_limits",
"description": "The updated lifetime limits",
"label": "",
"type": "string",
"longType": "string",
"fullType": "string",
"ismap": false,
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
},
{
"name": "withdraw_threshold",
"description": "The updated withdraw threshold",
"label": "",
"type": "string",
"longType": "string",
"fullType": "string",
"ismap": false,
"isoneof": false,
"oneofdecl": "",
"defaultValue": ""
}
]
},
{
"name": "ERC20AssetList",
"longName": "ERC20AssetList",
Expand Down Expand Up @@ -670,6 +730,18 @@
"isoneof": true,
"oneofdecl": "action",
"defaultValue": ""
},
{
"name": "asset_limits_updated",
"description": "Update an ERC20 asset",
"label": "",
"type": "ERC20AssetLimitsUpdated",
"longType": "ERC20AssetLimitsUpdated",
"fullType": "vega.ERC20AssetLimitsUpdated",
"ismap": false,
"isoneof": true,
"oneofdecl": "action",
"defaultValue": ""
}
]
},
Expand Down
13 changes: 13 additions & 0 deletions sources/vega/chain_events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ message ERC20AssetDelist {
string vega_asset_id = 1;
}

message ERC20AssetLimitsUpdated {
// The Vega network internal identifier of the asset
string vega_asset_id = 1;
// The Ethereum wallet that initiated the deposit
string source_ethereum_address = 2;
// The updated lifetime limits
string lifetime_limits = 3;
// The updated withdraw threshold
string withdraw_threshold = 4;
}

// An asset deposit for an ERC20 token
message ERC20Deposit {
// The vega network internal identifier of the asset
Expand Down Expand Up @@ -83,6 +94,8 @@ message ERC20Event {
ERC20Deposit deposit = 1003;
// Withdraw ERC20 asset
ERC20Withdrawal withdrawal = 1004;
// Update an ERC20 asset
ERC20AssetLimitsUpdated asset_limits_updated = 1005;
}
}

Expand Down
Loading

0 comments on commit f303ea3

Please sign in to comment.