Skip to content

Commit

Permalink
balanced messages separated from rlp lib
Browse files Browse the repository at this point in the history
  • Loading branch information
sagars committed Sep 6, 2024
1 parent aed6084 commit a132e2d
Show file tree
Hide file tree
Showing 34 changed files with 15 additions and 77 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ target
# macOS-specific files
.DS_Store
Cargo.lock
test_snapshots
test_snapshots
.VSCodeCounter
4 changes: 2 additions & 2 deletions contracts/asset_manager/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use crate::{
storage_types::{DataKey, POINTS},
xcall_manager_interface::XcallManagerClient,
};
use soroban_rlp::address_utils::{get_address_from, is_valid_string_address};
use soroban_rlp::messages::{
use soroban_rlp::balanced::address_utils::{get_address_from, is_valid_string_address};
use soroban_rlp::balanced::messages::{
deposit::Deposit, deposit_revert::DepositRevert, withdraw_to::WithdrawTo,
};

Expand Down
2 changes: 1 addition & 1 deletion contracts/asset_manager/src/tests/asset_manager_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use soroban_sdk::{
token, Address, Bytes, IntoVal, String, Symbol, Vec,
};

use soroban_rlp::messages::{deposit_revert::DepositRevert, withdraw_to::WithdrawTo};
use soroban_rlp::balanced::messages::{deposit_revert::DepositRevert, withdraw_to::WithdrawTo};

use super::setup::*;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use crate::{
config::{get_config, set_config, ConfigData},
xcall_manager_interface::XcallManagerClient,
};
use soroban_rlp::address_utils::{get_address_from, is_valid_bytes_address};
use soroban_rlp::messages::{
use soroban_rlp::balanced::address_utils::{get_address_from, is_valid_bytes_address};
use soroban_rlp::balanced::messages::{
cross_transfer::CrossTransfer, cross_transfer_revert::CrossTransferRevert,
};
use soroban_token_sdk::TokenUtils;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate std;
use crate::contract::BalancedDollarClient;

use super::setup::*;
use soroban_rlp::messages::{
use soroban_rlp::balanced::messages::{
cross_transfer::CrossTransfer, cross_transfer_revert::CrossTransferRevert,
};
use soroban_sdk::{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ extern crate std;

use crate::contract::BalancedDollarClient;


use soroban_sdk::{
symbol_short,
testutils::{Address as _, AuthorizedFunction, AuthorizedInvocation},
Expand Down Expand Up @@ -146,7 +147,6 @@ fn test_burn() {


let user2 = Address::generate(&e);
//let token = create_token(&e, &admin);

client.mint(&ctx.admin, &1000);
assert_eq!(client.balance(&ctx.admin), 1000);
Expand Down
15 changes: 2 additions & 13 deletions contracts/xcall_manager/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
write_proposed_removed, write_registry, write_sources,
}, storage_types::DataKey, white_list_actions::WhiteListActions
};
use soroban_rlp::messages::configure_protocols::ConfigureProtocols;
use soroban_rlp::balanced::messages::configure_protocols::ConfigureProtocols;

use crate::errors::ContractError;

Expand All @@ -34,21 +34,10 @@ impl XcallManager {
}
write_registry(&env, &registry);
write_administrator(&env, &admin);
Self::configure(env, config, sources, destinations);
}

pub fn configure(
env: Env,
config: ConfigData,
sources: Vec<String>,
destinations: Vec<String>,
) {
let admin = read_administrator(&env);
admin.require_auth();

set_config(&env, config);
write_sources(&env, &sources);
write_destinations(&env, &destinations);

}

pub fn get_config(env: Env) -> ConfigData {
Expand Down
2 changes: 1 addition & 1 deletion contracts/xcall_manager/src/tests/xcall_manager_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate std;
use crate::contract::XcallManagerClient;

use super::setup::*;
use soroban_rlp::messages::configure_protocols::ConfigureProtocols;
use soroban_rlp::balanced::messages::configure_protocols::ConfigureProtocols;
use soroban_sdk::{
symbol_short,
testutils::{Address as _, AuthorizedFunction, AuthorizedInvocation},
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ pub mod withdraw_to;
pub mod cross_transfer;
pub mod cross_transfer_revert;
pub mod configure_protocols;
pub mod execute;

2 changes: 2 additions & 0 deletions libs/soroban-rlp/src/balanced/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod address_utils;
pub mod messages;
3 changes: 1 addition & 2 deletions libs/soroban-rlp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#![no_std]
pub mod address_utils;
pub mod decoder;
pub mod encoder;
pub mod messages;
mod utils;
pub mod balanced;
52 changes: 0 additions & 52 deletions libs/soroban-rlp/src/messages/execute.rs

This file was deleted.

Binary file modified wasm/centralized_connection.wasm
100755 → 100644
Binary file not shown.
Binary file modified wasm/xcall.wasm
100755 → 100644
Binary file not shown.

0 comments on commit a132e2d

Please sign in to comment.