Skip to content

Commit

Permalink
Merge branch 'main' of github.com:AbstractSDK/abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberHoward committed Oct 29, 2024
2 parents a09238e + a743952 commit 36491ee
Show file tree
Hide file tree
Showing 80 changed files with 2,150 additions and 708 deletions.
265 changes: 141 additions & 124 deletions framework/Cargo.lock

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions framework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ cw-asset = { version = "4.0" }
cw-ownable = { version = "2.0" }
cw-address-like = { version = "2.0" }
cw-clearable = { version = "0.2.0" }
serde-cw-value = "0.7.0"

schemars = "0.8"
serde = { version = "1.0", default-features = false, features = ["derive"] }
Expand All @@ -52,13 +53,13 @@ protobuf = { version = "2", features = ["with-bytes"] }

clap = { version = "4.0.32", features = ["derive"] }
semver = "1.0"
cw-orch = { version = "0.26.0" }
cw-orch-interchain = { version = "0.7.0" }
cw-orch = { version = "0.27.0" }
cw-orch-interchain = { version = "0.8.1" }
tokio = { version = "1.4", features = ["full"] }

polytone = { package = "abstract-polytone", version = "2.0.0" }
polytone-note = { package = "abstract-polytone-note", version = "4.0.1" }
cw-orch-polytone = { package = "abstract-cw-orch-polytone", version = "5.0.0" }
polytone-note = { package = "abstract-polytone-note", version = "5.0.0" }
cw-orch-polytone = { package = "abstract-cw-orch-polytone", version = "6.0.0" }


## crates in order of publishing ## see docs/Publishing.md
Expand Down Expand Up @@ -122,10 +123,10 @@ incremental = false

[patch.crates-io]

# TODO: remove after polytone release
abstract-polytone = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
abstract-polytone-note = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
abstract-cw-orch-polytone = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
# In case Polytone not released
# abstract-polytone = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
# abstract-polytone-note = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }
# abstract-cw-orch-polytone = { git = "https://github.com/AbstractSDK/polytone.git", branch = "bump/cw2" }

[workspace.metadata.cargo-udeps.ignore]
# ensures CI doens't flag workspace-hack as unused dep
Expand Down
Binary file modified framework/artifacts/abstract_account-xion.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_account.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ans_host.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ibc_client.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ibc_host.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_ica_client.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_module_factory.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_registry.wasm
Binary file not shown.
16 changes: 8 additions & 8 deletions framework/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
04f4407f6bcd706a28327afb3bf5b2f16a18d75d0adc376ef44f8a4768d41877 abstract_account-xion.wasm
55124e42532e6cbfa306a8d85d3c8a634ec92d2803fe4dfeb8ed7918cd7e0e0c abstract_account.wasm
5f94f255722d33689eeb631bc796fbc1598985f8922d1987573644525dab4a1c abstract_ans_host.wasm
5e920677063397df022ce9ca9dd5e4f799c5ab7f601b7927cef013ca6be2486e abstract_ibc_client.wasm
3a14e2a3beeecc21d830367be33406dd2b5a33ab6733302b07fed0f3046f45dd abstract_ibc_host.wasm
9fb8a8e96e94977fd0b17265f1d4276484fe728ed943e3adcf9b4eca35ebf96a abstract_ica_client.wasm
11f769be8bf52d69c4af2d0ed539747ae359586740e3d05cb4ef20b1f8589422 abstract_module_factory.wasm
dea92cb8f17c18cb3b8ab64b832951d187f7c28747727811eecd640a096d7b35 abstract_registry.wasm
a2c127a1f275484c16059bccab2c50dca6ba6c8753b947bdf48870d3ab64af60 abstract_account-xion.wasm
4e6c8d287d806ea97288cd78e5898c727c9e90a82e423aaeed2d824617b3e83b abstract_account.wasm
706f0d8b007c0752c2f795e4a11d6fc42da9ff36485c6efcf2abd32c541d1fa9 abstract_ans_host.wasm
6d2ff01481324c369188d052be01182dcb6633c2623e9d855465b8b4804caf31 abstract_ibc_client.wasm
18f6be7e4a87f9083606b3ae7040ef07df363096b66e1fb780463856afcbd98e abstract_ibc_host.wasm
8561e3c0552cca824fdd3859e1771a9594c41d5824bcd064749b91b89e92d3b1 abstract_ica_client.wasm
5b250e3d2820b24558f2ccda57496b70ea4223f74e30fd4d68e21ebe74b5a3c8 abstract_module_factory.wasm
1bb37f63acd50dfcdb280c2f1dc49e94a2cb3402d272e1620ae3c00e3a605deb abstract_registry.wasm
2 changes: 1 addition & 1 deletion framework/contracts/account/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract-macros = { workspace = true }

abstract-ica = { workspace = true }

abstract-xion = { workspace = true, default-features = false, optional = true }
abstract-xion = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
workspace-hack = { version = "0.1", path = "../../workspace-hack" }
Expand Down
2 changes: 2 additions & 0 deletions framework/contracts/account/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ mod test {
exec_msg: to_json_binary(&abstract_std::ibc_client::ExecuteMsg::SendFunds {
host_chain: "juno".parse()?,
memo: None,
receiver: None,
})?,
funds: funds.clone(),
};
Expand Down Expand Up @@ -386,6 +387,7 @@ mod test {
msg: to_json_binary(&abstract_std::ibc_client::ExecuteMsg::SendFunds {
host_chain: "juno".parse()?,
memo: None,
receiver: None,
})?,
funds,
},))
Expand Down
20 changes: 13 additions & 7 deletions framework/contracts/native/ibc-client/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ pub fn execute_send_funds(
info: MessageInfo,
host_chain: TruncatedChainId,
memo: Option<String>,
receiver: Option<String>,
) -> IbcClientResult {
host_chain.verify()?;

Expand All @@ -380,13 +381,18 @@ pub fn execute_send_funds(

let account = registry.assert_account(&info.sender, &deps.querier)?;

// get account_id of Account
let account_id = account.account_id(deps.as_ref())?;
// load remote account
let remote_addr = ACCOUNTS.load(
deps.storage,
(account_id.trace(), account_id.seq(), &host_chain),
)?;
let remote_addr = match receiver {
Some(addr) => addr,
None => {
// get account_id of Account
let account_id = account.account_id(deps.as_ref())?;
// load remote account
ACCOUNTS.load(
deps.storage,
(account_id.trace(), account_id.seq(), &host_chain),
)?
}
};

let ics20_channel_entry = ChannelEntry {
connected_chain: host_chain,
Expand Down
12 changes: 9 additions & 3 deletions framework/contracts/native/ibc-client/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> I
ExecuteMsg::RegisterInfrastructure { chain, note, host } => {
commands::execute_register_infrastructure(deps, env, info, chain, host, note)
}
ExecuteMsg::SendFunds { host_chain, memo } => {
commands::execute_send_funds(deps, env, info, host_chain, memo).map_err(Into::into)
}
ExecuteMsg::SendFunds {
host_chain,
receiver,
memo,
} => commands::execute_send_funds(deps, env, info, host_chain, memo, receiver)
.map_err(Into::into),
ExecuteMsg::Register {
host_chain,
namespace,
Expand Down Expand Up @@ -637,6 +640,7 @@ mod tests {

let msg = ExecuteMsg::SendFunds {
host_chain: chain_name,
receiver: None,
memo: None,
};

Expand Down Expand Up @@ -678,6 +682,7 @@ mod tests {

let msg = ExecuteMsg::SendFunds {
host_chain: chain_name.clone(),
receiver: None,
memo: None,
};

Expand Down Expand Up @@ -711,6 +716,7 @@ mod tests {

let msg = ExecuteMsg::SendFunds {
host_chain: chain_name,
receiver: None,
memo: memo.clone(),
};

Expand Down
2 changes: 1 addition & 1 deletion framework/contracts/native/module-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ abstract-std = { workspace = true }
abstract-macros = { workspace = true }
cw-asset = { workspace = true }
cw-ownable = { workspace = true }
serde-cw-value = "0.7.0"
serde-cw-value = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
workspace-hack = { version = "0.1", path = "../../../workspace-hack" }
Expand Down
4 changes: 3 additions & 1 deletion framework/docs/src/releases/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### Added

- Abstract Account authentication when building account with `xion` feature.
- Added `PfmMemoBuilder` API for building middleware forwarding memo
- Added `HookMemoBuilder` API for building wasm ibc hook memo
- `execute_with_funds` to Executor to attach funds to execution.
- `stargate` feature for abstract-app, abstract-standalone and abstract-adapter packages.
- New module type: `Service`, behaves the same as Native, but can be registered by any namespace.
Expand All @@ -26,6 +27,7 @@
- `registry::QueryMsg::Account` was changed to `registry::QueryMsg::Accounts` for simultaneous queries
- Added `registry::QueryMsg::AccountList` for paginated account queries
- Simplified the implementations of KeyDeserialize, PrimaryKey and Prefixer traits for `AssetEntry`, `DexAssetPairing`, `ModuleInfo`, `ModuleVersion`. Used the base tuple implementation instead
- Removed `install_on_sub_account` for client, replaced with explicit sub_account creation

#### Abstract Client

Expand Down
Loading

0 comments on commit 36491ee

Please sign in to comment.