Skip to content

Commit fe280e4

Browse files
enriquesouzagupnik
andauthored
Feature: Add trade and secured fields to THORChain Asset (#4500)
* my tracked commit * MsgInstantiateContract * revert formatting * test * Tests fixes and broadcast * cargo fmt * remove unused * feat: add trade and secured fields to Thorchain Asset - Add trade and secured boolean fields to Asset proto message - Update ThorchainAsset struct in Rust with new fields - Update asset initialization in tx_builder.rs - Matches Thorchain blockchain Asset struct definition --------- Co-authored-by: gupnik <[email protected]>
1 parent 1efc1c1 commit fe280e4

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

rust/tw_cosmos_sdk/Protobuf/thorchain_bank_tx.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ message Asset {
1212
string symbol = 2;
1313
string ticker = 3;
1414
bool synth = 4;
15+
bool trade = 5;
16+
bool secured = 6;
1517
}
1618

1719
// Original: https://gitlab.com/thorchain/thornode/-/blob/develop/proto/thorchain/v1/common/common.proto
@@ -23,8 +25,8 @@ message Coin {
2325

2426
// MsgSend represents a message to send coins from one account to another.
2527
message MsgSend {
26-
bytes from_address = 1;
27-
bytes to_address = 2;
28+
bytes from_address = 1;
29+
bytes to_address = 2;
2830
repeated cosmos.base.v1beta1.Coin amount = 3;
2931
}
3032

rust/tw_cosmos_sdk/src/modules/tx_builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,8 @@ where
803803
symbol: asset_proto.symbol.to_string(),
804804
ticker: asset_proto.ticker.to_string(),
805805
synth: asset_proto.synth,
806+
trade: asset_proto.trade,
807+
secured: asset_proto.secured,
806808
};
807809
coins.push(ThorchainCoin {
808810
asset,

rust/tw_cosmos_sdk/src/transaction/message/thorchain_message.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ pub struct ThorchainAsset {
1616
pub symbol: String,
1717
pub ticker: String,
1818
pub synth: bool,
19+
pub trade: bool,
20+
pub secured: bool,
1921
}
2022

2123
impl ThorchainAsset {
@@ -25,6 +27,8 @@ impl ThorchainAsset {
2527
symbol: self.symbol.clone().into(),
2628
ticker: self.ticker.clone().into(),
2729
synth: self.synth,
30+
trade: self.trade,
31+
secured: self.secured,
2832
}
2933
}
3034
}

src/proto/Cosmos.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ message THORChainAsset {
4444
string symbol = 2;
4545
string ticker = 3;
4646
bool synth = 4;
47+
bool trade = 5;
48+
bool secured = 6;
4749
}
4850

4951
message THORChainCoin {

0 commit comments

Comments
 (0)