Commit 70df096f authored by Maurelian's avatar Maurelian Committed by GitHub

Merge pull request #1428 from ethereum-optimism/maurelian/eng-1174-add-an-l2tokenbridge-getter-to

parents b08d7258 468779ce
---
'@eth-optimism/contracts': patch
---
Add a getter to the ERC20 bridge interfaces, to return the address of the corresponding cross domain bridge
......@@ -33,7 +33,7 @@ contract OVM_L1StandardBridge is iOVM_L1StandardBridge, OVM_CrossDomainEnabled {
* External Contract References *
********************************/
address public l2TokenBridge;
address public override l2TokenBridge;
// Maps L1 token to L2 token to balance of the L1 token deposited
mapping(address => mapping (address => uint256)) public deposits;
......
......@@ -33,7 +33,7 @@ contract OVM_L2StandardBridge is iOVM_L2ERC20Bridge, OVM_CrossDomainEnabled {
* External Contract References *
********************************/
address public l1TokenBridge;
address public override l1TokenBridge;
/***************
* Constructor *
......
......@@ -33,6 +33,12 @@ interface iOVM_L1ERC20Bridge {
* Public Functions *
********************/
/**
* @dev get the address of the corresponding L2 bridge contract.
* @return Address of the corresponding L2 bridge contract.
*/
function l2TokenBridge() external returns(address);
/**
* @dev deposit an amount of the ERC20 to the caller's balance on L2.
* @param _l1Token Address of the L1 ERC20 we are depositing
......
......@@ -43,6 +43,12 @@ interface iOVM_L2ERC20Bridge {
* Public Functions *
********************/
/**
* @dev get the address of the corresponding L1 bridge contract.
* @return Address of the corresponding L1 bridge contract.
*/
function l1TokenBridge() external returns(address);
/**
* @dev initiate a withdraw of some tokens to the caller's account on L1
* @param _l2Token Address of L2 token where withdrawal was initiated.
......
......@@ -25,8 +25,9 @@ import 'hardhat-gas-reporter'
dotenv.config()
const enableGasReport = !!process.env.ENABLE_GAS_REPORT
const privateKey = process.env.PRIVATE_KEY ||
"0x0000000000000000000000000000000000000000000000000000000000000000"; // this is to avoid hardhat error
const privateKey =
process.env.PRIVATE_KEY ||
'0x0000000000000000000000000000000000000000000000000000000000000000' // this is to avoid hardhat error
const config: HardhatUserConfig = {
networks: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment