-
Notifications
You must be signed in to change notification settings - Fork 29
Feat/syn bridge unified [SYN-91] #334
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
Open
ChiTimesChi
wants to merge
27
commits into
master
Choose a base branch
from
feat/syn-bridge-unified
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
f621f30
fix: remove gas airdrop logic
ChiTimesChi 3b7545d
feat: allow governance to withdraw unspent gas airdops
ChiTimesChi 2cde3ea
feat: add legacy flag
ChiTimesChi 20b104d
test: coverage for legacy flagf
ChiTimesChi 285d915
test: coverage for new gov actions
ChiTimesChi f778571
test: reenabling
ChiTimesChi e9bb701
chore: revert docs formatting changes
ChiTimesChi 189b72e
chore: bump bridge version
ChiTimesChi acbcaa8
refactor: more explicit name for sending tokens
ChiTimesChi 0f34b97
chore: update actions/cache@v2 to v4 in GitHub workflows
ChiTimesChi 3407298
fix: update tests
ChiTimesChi 84491d9
test: expected behaviour for mint/withdraw pre/post legacy workflows
ChiTimesChi 2d66d69
feat: fallbacks to regular mint/withdraw
ChiTimesChi c314e1d
test: reentrancy cases
ChiTimesChi f9cda06
test: node group caller only
ChiTimesChi 880b817
test: withdrawFees cases
ChiTimesChi 82828e5
fix: reset fees before transfer
ChiTimesChi 85d9566
fix: old repo tests (#338)
ChiTimesChi bd94918
Merge branch 'feat/syn-bridge-unified' into syn-100-legacy-workflows
ChiTimesChi f63c26d
refactor: better separation of security checks
ChiTimesChi ec6948b
Merge pull request #335 from synapsecns/syn-100-legacy-workflows
ChiTimesChi 4616c2f
Merge branch 'feat/syn-bridge-unified' into syn-102-withdraw-fees
ChiTimesChi 2b5e00a
Merge pull request #336 from synapsecns/syn-102-withdraw-fees
ChiTimesChi c35907c
SYN-106: minor suggestions (#337)
ChiTimesChi 18b7fe9
Merge branch 'master' into feat/syn-bridge-unified
ChiTimesChi b7fb369
SYN-94: disable initializer in SynapseBridge implementation (#342)
ChiTimesChi a67c932
SYN-94: deploy script (#343)
ChiTimesChi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity 0.6.12; | ||
|
|
||
| // solhint-disable no-empty-blocks, no-unused-vars | ||
| contract PoolMock { | ||
| /// @notice We include an empty "test" function so that this contract does not appear in the coverage report. | ||
| function testPoolMock() external {} | ||
|
|
||
| function calculateSwap( | ||
| uint8 tokenIndexFrom, | ||
| uint8 tokenIndexTo, | ||
| uint256 amount | ||
| ) external returns (uint256) {} | ||
|
|
||
| function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex) external returns (uint256) {} | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity 0.6.12; | ||
| pragma experimental ABIEncoderV2; | ||
|
|
||
| import {SynapseERC20} from "../../../contracts/bridge/SynapseERC20.sol"; | ||
|
|
||
| import {Address} from "@openzeppelin/contracts/utils/Address.sol"; | ||
|
|
||
| contract ReenteringToken is SynapseERC20 { | ||
| address internal target; | ||
| bytes internal data; | ||
|
|
||
| function setReenteringData(address target_, bytes memory data_) public { | ||
| target = target_; | ||
| data = data_; | ||
| } | ||
|
|
||
| function _transfer( | ||
| address sender, | ||
| address recipient, | ||
| uint256 amount | ||
| ) internal virtual override { | ||
| super._transfer(sender, recipient, amount); | ||
| _reenterTarget(); | ||
| } | ||
|
|
||
| function _mint(address account, uint256 amount) internal virtual override { | ||
| super._mint(account, amount); | ||
| _reenterTarget(); | ||
| } | ||
|
|
||
| function _reenterTarget() internal { | ||
| if (target != address(0)) { | ||
| address target_ = target; | ||
| bytes memory data_ = data; | ||
| delete target; | ||
| delete data; | ||
| Address.functionCall(target_, data_); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.