Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Dec 13, 2024
1 parent 436f57d commit 2da5b5e
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ source: crates/astria-sequencer/src/app/tests_breaking_changes.rs
expression: app.app_hash.as_bytes()
---
[
157,
13,
132,
3,
217,
162,
227,
248,
73,
118,
68,
236,
34,
159,
87,
5,
85,
41,
161,
204,
145,
131,
167,
88,
101,
218,
254,
19,
102,
147,
63,
205,
234,
31,
196,
47,
222,
20,
84,
53,
174,
172,
189,
174,
154,
238,
97,
139,
220,
41,
164,
135,
194,
179,
87
244,
239,
59,
70,
251,
95,
70
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ source: crates/astria-sequencer/src/app/tests_breaking_changes.rs
expression: app.app_hash.as_bytes()
---
[
65,
196,
122,
216,
249,
102,
27,
156,
222,
203,
66,
255,
11,
178,
168,
59,
217,
172,
122,
116,
231,
1,
214,
143,
185,
29,
138,
161,
109,
71,
78,
249,
62,
16,
107,
192,
151,
124,
20
74,
167,
201,
134,
26,
35,
157,
44,
206,
101,
210,
2,
96,
162,
213,
165,
49,
82,
19,
134,
82,
247,
72
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@ source: crates/astria-sequencer/src/app/tests_breaking_changes.rs
expression: app.app_hash.as_bytes()
---
[
150,
81,
50,
231,
107,
236,
27,
6,
41,
178,
107,
36,
215,
247,
161,
143,
121,
170,
69,
5,
151,
193,
86,
129,
159,
216,
205,
186,
209,
114,
59,
28,
146,
221,
210,
24,
78,
74,
36,
151,
35,
133,
176,
209
102,
243,
221,
51,
5,
90,
88,
208,
47,
18,
92,
248,
211,
103,
156,
26,
127,
58
]
34 changes: 34 additions & 0 deletions crates/astria-sequencer/src/app/tests_breaking_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
use std::{
collections::HashMap,
str::FromStr as _,
sync::Arc,
};

use astria_core::{
connect::types::v2::CurrencyPair,
primitive::v1::{
Address,
RollupId,
Expand All @@ -23,11 +25,13 @@ use astria_core::{
genesis::v1::Account,
transaction::v1::{
action::{
AddCurrencyPairs,
BridgeLock,
BridgeSudoChange,
BridgeUnlock,
IbcRelayerChange,
IbcSudoChange,
RemoveCurrencyPairs,
RollupDataSubmission,
Transfer,
ValidatorUpdate,
Expand Down Expand Up @@ -361,6 +365,36 @@ async fn app_execute_transaction_with_every_action_snapshot() {
let signed_tx = Arc::new(tx_bridge.sign(&bridge));
app.execute_transaction(signed_tx).await.unwrap();

let currency_pair_tia = CurrencyPair::from_str("TIA/USD").unwrap();
let currency_pair_eth = CurrencyPair::from_str("ETH/USD").unwrap();
let tx = TransactionBody::builder()
.actions(vec![
AddCurrencyPairs {
pairs: vec![currency_pair_tia.clone(), currency_pair_eth.clone()],
}
.into(),
])
.chain_id("test")
.nonce(4)
.try_build()
.unwrap();
let signed_tx = Arc::new(tx.sign(&alice));
app.execute_transaction(signed_tx).await.unwrap();

let tx = TransactionBody::builder()
.actions(vec![
RemoveCurrencyPairs {
pairs: vec![currency_pair_tia.clone()],
}
.into(),
])
.chain_id("test")
.nonce(5)
.try_build()
.unwrap();
let signed_tx = Arc::new(tx.sign(&alice));
app.execute_transaction(signed_tx).await.unwrap();

let sudo_address = app.state.get_sudo_address().await.unwrap();
app.end_block(1, &sudo_address).await.unwrap();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,7 @@ async fn test_app_execute_transaction_add_and_remove_currency_pairs() {
.into(),
])
.chain_id("test")
.nonce(1)
.try_build()
.unwrap();

Expand Down

0 comments on commit 2da5b5e

Please sign in to comment.