Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comet update #214

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ codegen-units = 1
lto = true

[workspace.dependencies.soroban-sdk]
version = "20.3.2"
version = "20.5.0"

[workspace.dependencies.soroban-fixed-point-math]
version = "1.0.0"
Expand Down
4 changes: 3 additions & 1 deletion backstop/src/emissions/claim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,20 @@ pub fn execute_claim(e: &Env, from: &Address, pool_addresses: &Vec<Address>, to:
if claimed > 0 {
let blnd_id = storage::get_blnd_token(e);
let lp_id = storage::get_backstop_token(e);
let approval_ledger = (e.ledger().sequence() / 100000 + 1) * 100000;
let args: Vec<Val> = vec![
e,
(&e.current_contract_address()).into_val(e),
(&lp_id).into_val(e),
(&claimed).into_val(e),
(&approval_ledger).into_val(e),
];
e.authorize_as_current_contract(vec![
&e,
InvokerContractAuthEntry::Contract(SubContractInvocation {
context: ContractContext {
contract: blnd_id.clone(),
fn_name: Symbol::new(e, "transfer"),
fn_name: Symbol::new(e, "approve"),
args: args.clone(),
},
sub_invocations: vec![e],
Expand Down
2 changes: 1 addition & 1 deletion backstop/src/testutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ pub(crate) fn create_comet_lp_pool<'a>(
);

client.set_swap_fee(&0_0030000, &admin);
client.finalize();
client.set_public_swap(&admin, &true);
client.finalize();

(contract_address, client)
}
Expand Down
Binary file modified comet.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion pool/src/testutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ pub(crate) fn create_comet_lp_pool<'a>(
);

client.set_swap_fee(&0_0030000, &admin);
client.finalize();
client.set_public_swap(&admin, &true);
client.finalize();
Comment on lines 173 to +174
Copy link
Contributor

Choose a reason for hiding this comment

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

why was this change necessary?

IIRC finalize had nothing to do with set_public_swap, but this could have changed on comet's end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They now check that finalize has not been called when performing pool setup


(contract_address, client)
}
Expand Down
2 changes: 1 addition & 1 deletion test-suites/src/liquidity_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ pub(crate) fn create_lp_pool<'a>(
);

client.set_swap_fee(&0_0030000, &admin);
client.finalize();
client.set_public_swap(&admin, &true);
client.finalize();

(contract_address, client)
}
Loading