Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Add ModuleActionWithData variant to Proxy #369

Merged
merged 6 commits into from
Jun 13, 2023
Merged

Conversation

CyberHoward
Copy link
Contributor

@CyberHoward CyberHoward commented Jun 12, 2023

Adds a new endpoint that supports response data forwarding through a reply in the proxy contract. This allows developers to execute actions on a contract and retrieve the result data even when proxied through the account.

@CyberHoward
Copy link
Contributor Author

closes #364

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jun 12, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4f14480
Status: ✅  Deploy successful!
Preview URL: https://419cbfdc.contracts-egs.pages.dev
Branch Preview URL: https://add-submessage-endpoint.contracts-egs.pages.dev

View logs

@CyberHoward CyberHoward changed the title Add ModuleActionResponse variant to Proxy Add ModuleActionWithData variant to Proxy Jun 12, 2023
@github-actions github-actions bot added account Changes to the account base logic interface sdk labels Jun 12, 2023
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #369 (4f14480) into main (63b8a01) will decrease coverage by 0.2%.
The diff coverage is 48.2%.

Impacted Files Coverage Δ
contracts/account/proxy/src/error.rs 100.0% <ø> (ø)
contracts/account/proxy/src/lib.rs 100.0% <ø> (ø)
packages/abstract-core/src/core/proxy.rs 61.1% <ø> (ø)
packages/abstract-sdk/src/apis/execution.rs 89.6% <0.0%> (-9.5%) ⬇️
contracts/account/proxy/src/reply.rs 71.4% <71.4%> (ø)
contracts/account/proxy/src/contract.rs 98.4% <80.0%> (-0.8%) ⬇️
contracts/account/proxy/src/commands.rs 98.4% <92.8%> (-0.3%) ⬇️

Comment on lines +40 to +43
let submsg = SubMsg::reply_on_success(msg, RESPONSE_REPLY_ID);

Ok(ProxyResponse::action("execute_module_action_response").add_submessage(submsg))
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀 🚀

Copy link
Contributor

@Kayanski Kayanski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merging, we need to discuss whether the execute message should be a vector to have a unified API for the execute on proxy methods ?

contracts/account/proxy/src/contract.rs Show resolved Hide resolved
contracts/account/proxy/src/commands.rs Show resolved Hide resolved
Copy link

@Buckram123 Buckram123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great!

contracts/account/proxy/src/reply.rs Outdated Show resolved Hide resolved
@CyberHoward CyberHoward merged commit e894b71 into main Jun 13, 2023
15 of 16 checks passed
@CyberHoward CyberHoward deleted the add/submessage_endpoint branch June 13, 2023 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
account Changes to the account base logic interface sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants