Skip to content

Commit

Permalink
fix addresses in authorizations (#55)
Browse files Browse the repository at this point in the history
* fix addresses in authorizations

* fix test fail

* fix

* fix test
  • Loading branch information
Art3miX authored Oct 8, 2024
1 parent 72e45b8 commit 61a8436
Show file tree
Hide file tree
Showing 16 changed files with 221 additions and 98 deletions.
112 changes: 60 additions & 52 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ valence-reverse-splitter-service = { path = "contracts/services/reverse-splitter
valence-account-utils = { path = "packages/account-utils" }
valence-astroport-utils = { path = "packages/astroport-utils" }
valence-authorization-utils = { path = "packages/authorization-utils" }
valence-local-interchaintest-utils = { path = "packages/local-interchaintest-utils" }
valence-macros = { path = "packages/valence-macros" }
valence-polytone-utils = { path = "packages/polytone-utils" }
valence-processor-utils = { path = "packages/processor-utils" }
Expand Down
2 changes: 1 addition & 1 deletion contracts/services/reverse-splitter/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ fn instantiate_fails_for_zero_ratio() {

#[test]
#[should_panic(
expected = "Configuration error: Duplicate split 'Native(\"untrn\")|AccountAddr(\"cosmwasm1xj6u4ccauyhvylgtj82x2qqc34lk3xuzw4mujevzqyr4gj7gqsjsv4856c\")' in split config."
expected = "Configuration error: Duplicate split 'Native(\"untrn\")|Addr(\"cosmwasm1xj6u4ccauyhvylgtj82x2qqc34lk3xuzw4mujevzqyr4gj7gqsjsv4856c\")' in split config."
)]
fn instantiate_fails_for_duplicate_split() {
let mut suite = ReverseSplitterTestSuite::default();
Expand Down
2 changes: 1 addition & 1 deletion contracts/services/splitter/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ fn instantiate_fails_for_no_split_config() {

#[test]
#[should_panic(
expected = "Configuration error: Duplicate split 'Native(\"untrn\")|AccountAddr(\"cosmwasm1ea6n0jqm0hj663khx7a5xklsmjgrazjp9vjeewejn84sanr0wgxq2p70xl\")' in split config."
expected = "Configuration error: Duplicate split 'Native(\"untrn\")|Addr(\"cosmwasm1ea6n0jqm0hj663khx7a5xklsmjgrazjp9vjeewejn84sanr0wgxq2p70xl\")' in split config."
)]
fn instantiate_fails_for_duplicate_split() {
let mut suite = SplitterTestSuite::default();
Expand Down
3 changes: 2 additions & 1 deletion local-interchaintest/examples/polytone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ use valence_processor_utils::{
msg::PolytoneContracts,
processor::{Config, MessageBatch, ProcessorDomain},
};
use valence_service_utils::ServiceAccountType;

const TIMEOUT_SECONDS: u64 = 15;
const MAX_ATTEMPTS: u64 = 50;
Expand Down Expand Up @@ -506,7 +507,7 @@ fn main() -> Result<(), Box<dyn Error>> {
},
},
// We don't care about the execution result so we will just make it fail when ticking the processor
contract_address: "any".to_string(),
contract_address: ServiceAccountType::Addr("any".to_string()),
};
let mut authorization = AuthorizationInfo {
label: "label".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions local-interchaintest/examples/token_swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fn main() -> Result<(), Box<dyn Error>> {
input_addr: base_account_1.clone(),
splits: vec![UncheckedSplitConfig {
denom: UncheckedDenom::Native(token1.clone()),
account: ServiceAccountType::AccountAddr(base_account_2.clone()),
account: ServiceAccountType::Addr(base_account_2.clone()),
amount: UncheckedSplitAmount::FixedAmount(swap_amount.into()),
}],
},
Expand All @@ -228,7 +228,7 @@ fn main() -> Result<(), Box<dyn Error>> {
input_addr: base_account_2.clone(),
splits: vec![UncheckedSplitConfig {
denom: UncheckedDenom::Native(token2.clone()),
account: ServiceAccountType::AccountAddr(base_account_1.clone()),
account: ServiceAccountType::Addr(base_account_1.clone()),
amount: UncheckedSplitAmount::FixedAmount(swap_amount.into()),
}],
},
Expand Down
1 change: 1 addition & 0 deletions packages/authorization-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ cosmwasm-schema = { workspace = true }
neutron-sdk = { workspace = true }
cw-ownable = { workspace = true }
valence-polytone-utils = { workspace = true }
valence-service-utils = { workspace = true }
serde_json = { workspace = true }
Loading

0 comments on commit 61a8436

Please sign in to comment.