diff --git a/entity/asset.go b/entity/asset.go index a3d3bfa4..4348fede 100644 --- a/entity/asset.go +++ b/entity/asset.go @@ -30,8 +30,10 @@ type Asset struct { LogoPNG string `yaml:"logo_png"` Types []string `yaml:"types"` Standards []string `yaml:"standards"` +} - ChainUUID string +func (a *Asset) GetId() string { + return a.Id } func (a *Asset) GetName() string { diff --git a/entity/chain.go b/entity/chain.go index dc5e1571..3720096c 100644 --- a/entity/chain.go +++ b/entity/chain.go @@ -8,6 +8,7 @@ const ( ) type Chain struct { + Id string `yaml:"id"` ParentId string `yaml:"parent_id"` Name string `yaml:"name"` Symbol string `yaml:"symbol"` @@ -17,8 +18,9 @@ type Chain struct { Type ChainType `yaml:"type"` } -func NewChain(name, symbol string, chainType ChainType, chainId string) *Chain { +func NewChain(Id, name, symbol string, chainType ChainType, chainId string) *Chain { return &Chain{ + Id: Id, Name: name, Symbol: symbol, ChainId: chainId, @@ -26,6 +28,10 @@ func NewChain(name, symbol string, chainType ChainType, chainId string) *Chain { } } +func (c *Chain) GetID() string { + return c.Id +} + func (c *Chain) GetName() string { return c.Name } diff --git a/resources/assets.yaml b/resources/assets.yaml index 92b0c6eb..a6fab0c1 100644 --- a/resources/assets.yaml +++ b/resources/assets.yaml @@ -1,4 +1,5 @@ bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda: + id: bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda parent_id: "" name: Ethereum symbol: ETH @@ -7,6 +8,7 @@ bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda: type: main assets: bc2cd3b5-ebfb-11ed-bd6d-bce92fb9ddda: + id: bc2cd3b5-ebfb-11ed-bd6d-bce92fb9ddda name: Tether symbol: USDT contracts: @@ -21,6 +23,7 @@ bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda: standards: - ERC20 ae43c0bd-2587-4384-936d-24cc2e5a1b0c: + id: ae43c0bd-2587-4384-936d-24cc2e5a1b0c name: Dai symbol: DAI contracts: @@ -35,6 +38,7 @@ bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda: standards: - ERC20 db4461d5-4747-436c-9d7c-51c88e597813: + id: db4461d5-4747-436c-9d7c-51c88e597813 name: Binance Coin symbol: BNB contracts: @@ -48,6 +52,7 @@ bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda: types: [ ] standards: fa7bfc08-25dd-477d-bb83-bf0a1039b446: + id: fa7bfc08-25dd-477d-bb83-bf0a1039b446 name: USD Coin symbol: USDC contracts: @@ -61,6 +66,7 @@ bc08bb60-ebfb-11ed-bd6d-bce92fb9ddda: types: [ ] standards: cfc035ff-52c3-4357-bebd-02ad6813d123: + id: cfc035ff-52c3-4357-bebd-02ad6813d123 parent_id: "" name: BNB Smart Chain (BEP20) symbol: BNB @@ -68,6 +74,7 @@ cfc035ff-52c3-4357-bebd-02ad6813d123: type: main assets: c4ed735b-9c87-4735-a029-fb11fef57ecb: + id: c4ed735b-9c87-4735-a029-fb11fef57ecb name: XRP Coin symbol: XRP contracts: @@ -81,6 +88,7 @@ cfc035ff-52c3-4357-bebd-02ad6813d123: types: [] standards: f438b0c8-3b98-4da7-88f3-10ff760b9ff1: + id: f438b0c8-3b98-4da7-88f3-10ff760b9ff1 parent_id: "" name: Goerli symbol: ETH @@ -89,6 +97,7 @@ f438b0c8-3b98-4da7-88f3-10ff760b9ff1: type: test assets: f0e13421-4798-45ed-9ce5-a559cdb5133e: + id: f0e13421-4798-45ed-9ce5-a559cdb5133e name: Tether symbol: USDT contracts: