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

improve(Optimism_SpokePool): Fix comments and relocate SynthetixBridgeToBase interface #524

Merged
merged 1 commit into from
Jun 18, 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
5 changes: 5 additions & 0 deletions contracts/Optimism_SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import "@eth-optimism/contracts/libraries/constants/Lib_PredeployAddresses.sol";
import "./Ovm_SpokePool.sol";
import "./external/interfaces/CCTPInterfaces.sol";

// https://github.com/Synthetixio/synthetix/blob/5ca27785fad8237fb0710eac01421cafbbd69647/contracts/SynthetixBridgeToBase.sol#L50
interface SynthetixBridgeToBase {
function withdrawTo(address to, uint256 amount) external;
}

/**
* @notice Optimism Spoke pool.
*/
Expand Down
8 changes: 2 additions & 6 deletions contracts/Ovm_SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ import "./libraries/CircleCCTPAdapter.sol";
import "@openzeppelin/contracts-upgradeable/crosschain/optimism/LibOptimismUpgradeable.sol";
import "@eth-optimism/contracts/libraries/constants/Lib_PredeployAddresses.sol";

// https://github.com/Synthetixio/synthetix/blob/5ca27785fad8237fb0710eac01421cafbbd69647/contracts/SynthetixBridgeToBase.sol#L50
interface SynthetixBridgeToBase {
function withdrawTo(address to, uint256 amount) external;
}

// https://github.com/ethereum-optimism/optimism/blob/bf51c4935261634120f31827c3910aa631f6bf9c/packages/contracts-bedrock/contracts/L2/L2StandardBridge.sol
interface IL2ERC20Bridge {
function withdrawTo(
Expand Down Expand Up @@ -52,7 +47,8 @@ contract Ovm_SpokePool is SpokePool, CircleCCTPAdapter {
address private __deprecated_messenger;

// Stores alternative token bridges to use for L2 tokens that don't go over the standard bridge. This is needed
// to support non-standard ERC20 tokens on Optimism, such as DIA and SNX which both use custom bridges.
// to support non-standard ERC20 tokens on Optimism, such as DAI which uses a custom bridge with the same
// interface as the standard bridge.
mapping(address => address) public tokenBridges;

// Stores mapping of L2 tokens to L1 equivalent tokens. If a mapping is defined for a given L2 token, then
Expand Down
Loading