Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0e623cd
reorg MIN_RESERVE of stable, rated, degen pool to inner precision / 1000
Dec 7, 2024
d338e52
reorg MIN_RESERVE of stable, rated, degen pool to inner precision / 1000
Dec 7, 2024
519a07f
build release
MagicGordon Dec 7, 2024
0bee0a4
Merge branch 'main' into accumulated-updates
MagicGordon Jan 14, 2025
8322bc0
amendments according to audition recommendations.
MagicGordon Jan 15, 2025
26be36a
add skip_degen_price_sync param.
MagicGordon Feb 13, 2025
5d8d059
fix tests
MagicGordon Feb 13, 2025
072abcf
Merge branch 'main' into accumulated-updates
MagicGordon Mar 19, 2025
f0ed401
add SwapVolumeU256
MagicGordon Mar 19, 2025
38447c2
update reference
MagicGordon Mar 19, 2025
5ec8821
fix test
MagicGordon Mar 19, 2025
e854472
add test
MagicGordon Mar 20, 2025
9fa3edc
update pool volumes
MagicGordon Mar 20, 2025
e23d07f
Merge branch 'main' into accumulated-updates
MagicGordon Apr 9, 2025
dcd8c27
add get_pool_shares_batch
MagicGordon Jun 17, 2025
8d63b4e
Merge branch 'main' into accumulated-updates
MagicGordon Jul 2, 2025
6b5b518
add batch_views
MagicGordon Jul 2, 2025
1749f36
Merge branch 'main' into accumulated-updates
marco-sundsk Sep 16, 2025
d05c093
support secure sender whitelist in client echo feature
marco-sundsk Sep 17, 2025
f42f4da
force legal pattern when using wildcard and add comprehensive tests
marco-sundsk Sep 17, 2025
5dfd2a0
clean test comments
marco-sundsk Sep 17, 2025
a352f12
gas improvement
marco-sundsk Oct 2, 2025
f0aff36
gas improvement
marco-sundsk Oct 2, 2025
049ac79
fix release_notes
marco-sundsk Oct 2, 2025
c676fca
fix gas issue
marco-sundsk Oct 13, 2025
2cb772f
update readme
marco-sundsk Oct 13, 2025
32c9793
fix transfer near callback gas issue
marco-sundsk Oct 13, 2025
8030f5b
Merge branch 'main' into accumulated-updates
marco-sundsk Oct 14, 2025
f10922d
fix tests
marco-sundsk Oct 14, 2025
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
2 changes: 1 addition & 1 deletion 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 ref-exchange/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ref-exchange"
version = "1.9.15"
version = "1.9.16"
authors = ["Illia Polosukhin <illia.polosukhin@gmail.com>"]
edition = "2018"
publish = false
Expand Down
6 changes: 6 additions & 0 deletions ref-exchange/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release Notes

### Version 1.9.16
```
BXSNfiJC2LbVUgRTpHxAYfLiPYDwAn7cXLKJeTsVHRkG
```
1. use 10Tgas for transfer near call back.

### Version 1.9.15
```
6VT8PzHwyphkL64Gi7GLS8YyBqmeVU8y8xjSd5ej53sF
Expand Down
4 changes: 2 additions & 2 deletions ref-exchange/src/account_deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use near_sdk::{
AccountId, Balance, PromiseResult, StorageUsage,
};
use crate::legacy::{AccountV1, AccountV2};
use crate::utils::{ext_self, ext_wrap_near, GAS_FOR_FT_TRANSFER, GAS_FOR_FT_TRANSFER_CALL, GAS_FOR_NEAR_WITHDRAW, GAS_FOR_CB_FT_TRANSFER};
use crate::utils::{ext_self, ext_wrap_near, GAS_FOR_FT_TRANSFER, GAS_FOR_FT_TRANSFER_CALL, GAS_FOR_NEAR_WITHDRAW, GAS_FOR_CB_NEAR_TRANSFER, GAS_FOR_CB_FT_TRANSFER};
use crate::*;

// [AUDIT_01]
Expand Down Expand Up @@ -609,7 +609,7 @@ impl Contract {
U128(amount),
&env::current_account_id(),
0,
GAS_FOR_CB_FT_TRANSFER,
GAS_FOR_CB_NEAR_TRANSFER,
))
} else {
ext_fungible_token::ft_transfer(
Expand Down
2 changes: 2 additions & 0 deletions ref-exchange/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ pub const DEFAULT_EXTRA_TGAS: u32 = 15;
pub const GAS_FOR_FT_TRANSFER: Gas = 20_000_000_000_000;
pub const GAS_FOR_NEAR_WITHDRAW: Gas = 20_000_000_000_000;

/// Call back for Near transfer need extra gas
pub const GAS_FOR_CB_NEAR_TRANSFER: Gas = 10_000_000_000_000;
pub const GAS_FOR_CB_FT_TRANSFER: Gas = 5_000_000_000_000;

/// Fee divisor, allowing to provide fee in bps.
Expand Down
2 changes: 1 addition & 1 deletion ref-exchange/tests/test_migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn test_upgrade() {
.assert_success();
let metadata = get_metadata(&pool);
// println!("{:#?}", metadata);
assert_eq!(metadata.version, "1.9.15".to_string());
assert_eq!(metadata.version, "1.9.16".to_string());
assert_eq!(metadata.admin_fee_bps, 5);
assert_eq!(metadata.boost_farm_id, "boost_farm".to_string());
assert_eq!(metadata.burrowland_id, "burrowland".to_string());
Expand Down
Binary file modified releases/ref_exchange_release.wasm
Binary file not shown.
Binary file added releases/ref_exchange_release_v1915.wasm
Binary file not shown.