forked from circlefin/stablecoin-evm
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOptimismFiatTokenV2_2.sol
More file actions
43 lines (37 loc) · 1.47 KB
/
OptimismFiatTokenV2_2.sol
File metadata and controls
43 lines (37 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import { FiatTokenV1 } from "../v1/FiatTokenV1.sol";
import { FiatTokenV2_2 } from "./FiatTokenV2_2.sol";
import { IOptimismMintableERC20 } from "./IOptimismMintableERC20.sol";
import { IERC165 } from "@openzeppelin/contracts/introspection/IERC165.sol";
/**
* @title OptimismFiatTokenV2_2
* @author Lattice (https://lattice.xyz)
* @notice Adds compatibility with IOptimismMintableERC20 to the Bridged USDC Standard,
* so it can be used with Optimism's StandardBridge.
* @dev This contract does not extend `IOptimismMintableERC20` to avoid the requirement to override `mint` and `burn` functions.
*/
contract OptimismFiatTokenV2_2 is FiatTokenV2_2, IERC165 {
address private immutable l1RemoteToken;
constructor(address _l1RemoteToken) public FiatTokenV2_2() {
l1RemoteToken = _l1RemoteToken;
}
function remoteToken() external view returns (address) {
return l1RemoteToken;
}
function bridge() external pure returns (address) {
// OP Stack L2StandardBridge predeploy
// https://specs.optimism.io/protocol/predeploys.html
return address(0x4200000000000000000000000000000000000010);
}
function supportsInterface(bytes4 interfaceId)
external
override
view
returns (bool)
{
return
interfaceId == type(IOptimismMintableERC20).interfaceId ||
interfaceId == type(IERC165).interfaceId;
}
}