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

Xchain pools #1601

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b7a8cbe
start on cross chain pools with cl functions
dbeal-eth Apr 30, 2023
73296fe
initial efforts
dbeal-eth May 3, 2023
2a2a741
closer pre single chain tests
dbeal-eth May 6, 2023
aaf98cb
write out planned tests, rework a bit of the cross chain details
dbeal-eth May 8, 2023
d1618f3
add missing file
dbeal-eth May 11, 2023
a73318c
tests back to normal
dbeal-eth May 11, 2023
d95ce8a
add important debt check test
dbeal-eth May 11, 2023
9dc0b9d
add some tests before I leave for vacation
dbeal-eth May 13, 2023
3ee617b
minor fixes
barrasso May 15, 2023
c075ec8
more minor fixes
barrasso May 15, 2023
eaa4b30
Run yarn lint:sol:fix
barrasso May 16, 2023
75a94cb
Run yarn lint:js:fix
barrasso May 16, 2023
2589b1b
Use CrossChain storage lib for cross chain usd transfers
barrasso May 16, 2023
340ecf8
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth May 24, 2023
91e32af
fixes for utils module, allow xchain pools to have its own versioning
dbeal-eth May 25, 2023
c19c177
v3.2.0-xchain.0
dbeal-eth May 25, 2023
8dc4b7c
fix error
dbeal-eth May 25, 2023
538f30e
Implement burn from sender (#1622)
barrasso May 26, 2023
de5eb7c
fixes
dbeal-eth May 29, 2023
1ca2ff6
first successful ccip send of createCrossChainPool
dbeal-eth Jun 1, 2023
4b4e718
Merge branch 'main' into xchain-pools
barrasso Jun 3, 2023
7df95a8
fixes to load contract from misc source
dbeal-eth Jun 3, 2023
3e9793d
Add transfer cross chain USD tests (#1634)
barrasso Jun 6, 2023
7accba1
Merge branch 'main' into xchain-pools
barrasso Jun 6, 2023
b4f29ec
fix lint
barrasso Jun 7, 2023
7da2943
Merge branch 'xchain-pools' of https://github.com/Synthetixio/synthet…
dbeal-eth Jun 8, 2023
448d995
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth Jun 8, 2023
1042046
update transferCrossChain (#1650)
barrasso Jun 13, 2023
52ca63a
Merge branch 'main' into xchain-pools
barrasso Jun 13, 2023
d8e72c7
fix sol lint and revert deps change
barrasso Jun 13, 2023
66cd31a
fixes
dbeal-eth Jun 14, 2023
0533ccf
Merge branch 'xchain-pools' of https://github.com/Synthetixio/synthet…
dbeal-eth Jun 14, 2023
a824f61
Merge branch 'main' into 'xchain-pools'
barrasso Jun 20, 2023
02cc76b
Merge branch 'main' into xchain-pools
barrasso Jun 22, 2023
fc97fca
Merge branch 'main' into xchain-pools
barrasso Jun 22, 2023
a1c1a89
run yarn
barrasso Jun 23, 2023
3edc204
Use EVMTokenAmount amount
barrasso Jun 23, 2023
0bbd1ab
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth Aug 17, 2023
e15d9a2
few test fixes
dbeal-eth Aug 17, 2023
46eeccf
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth Aug 29, 2023
4ba3455
contracts compile
dbeal-eth Aug 29, 2023
4b30fc7
small refactor before I forget to do it
dbeal-eth Aug 30, 2023
75fc892
some tests work
dbeal-eth Aug 31, 2023
58c9463
add missing files
dbeal-eth Sep 2, 2023
b2ae508
Merge
dbeal-eth Sep 20, 2023
843d554
Merge remote-tracking branch 'origin/main' into xchain-pools
dbeal-eth Sep 20, 2023
6613846
finish wormhole, write in a bunch of the tests
dbeal-eth Oct 1, 2023
116aa90
fix need to have selectors
dbeal-eth Oct 1, 2023
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
Prev Previous commit
Next Next commit
more minor fixes
barrasso committed May 15, 2023
commit c075ec82b8af2c18a04293d2267004e071ed65c7
17 changes: 9 additions & 8 deletions protocol/synthetix/contracts/modules/core/CollateralModule.sol
Original file line number Diff line number Diff line change
@@ -14,8 +14,6 @@ import "../../storage/Pool.sol";

import "@synthetixio/core-modules/contracts/storage/FeatureFlag.sol";

import "hardhat/console.sol";

/**
* @title Module for managing user collateral.
* @dev See ICollateralModule.
@@ -162,12 +160,15 @@ contract CollateralModule is ICollateralModule {
uint128 lockPoolSync = locks[index].lockExpirationPoolSync;

if (
lockExpirationTime <= currentTime &&
(lockPoolSync == 0 || (
// can only unlock if pool sync time is met and the account is above the target ratio
Pool.load(lockPoolSync).getOldestSync() >= lockExpirationTime &&
Pool.load(lockPoolSync).currentAccountCollateralRatio(locks[index].lockExpirationPoolSyncVault, accountId) >= CollateralConfiguration.load(collateralType).issuanceRatioD18
))
lockExpirationTime <= currentTime &&
(lockPoolSync == 0 ||
(// can only unlock if pool sync time is met and the account is above the target ratio
Pool.load(lockPoolSync).getOldestSync() >= lockExpirationTime &&
Pool.load(lockPoolSync).currentAccountCollateralRatio(
locks[index].lockExpirationPoolSyncVault,
accountId
) >=
CollateralConfiguration.load(collateralType).issuanceRatioD18))
) {
emit CollateralLockExpired(
accountId,
5 changes: 1 addition & 4 deletions protocol/synthetix/contracts/storage/PoolCrossChainInfo.sol
Original file line number Diff line number Diff line change
@@ -7,13 +7,10 @@ library PoolCrossChainInfo {
struct Data {
PoolCrossChainSync.Data latestSync;
uint128 latestTotalWeights;

uint64[] pairedChains;
mapping(uint64 => uint128) pairedPoolIds;

uint64 chainlinkSubscriptionId;
uint32 chainlinkSubscriptionInterval;

bytes32 latestRequestId;
}
}
}