Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
70df096f
Unverified
Commit
70df096f
authored
Sep 12, 2021
by
Maurelian
Committed by
GitHub
Sep 12, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1428 from ethereum-optimism/maurelian/eng-1174-add-an-l2tokenbridge-getter-to
parents
b08d7258
468779ce
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
4 deletions
+22
-4
ninety-years-smell.md
.changeset/ninety-years-smell.md
+5
-0
OVM_L1StandardBridge.sol
...istic-ethereum/OVM/bridge/tokens/OVM_L1StandardBridge.sol
+1
-1
OVM_L2StandardBridge.sol
...istic-ethereum/OVM/bridge/tokens/OVM_L2StandardBridge.sol
+1
-1
iOVM_L1ERC20Bridge.sol
...mistic-ethereum/iOVM/bridge/tokens/iOVM_L1ERC20Bridge.sol
+6
-0
iOVM_L2ERC20Bridge.sol
...mistic-ethereum/iOVM/bridge/tokens/iOVM_L2ERC20Bridge.sol
+6
-0
hardhat.config.ts
packages/contracts/hardhat.config.ts
+3
-2
No files found.
.changeset/ninety-years-smell.md
0 → 100644
View file @
70df096f
---
'
@eth-optimism/contracts'
:
patch
---
Add a getter to the ERC20 bridge interfaces, to return the address of the corresponding cross domain bridge
packages/contracts/contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L1StandardBridge.sol
View file @
70df096f
...
...
@@ -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;
...
...
packages/contracts/contracts/optimistic-ethereum/OVM/bridge/tokens/OVM_L2StandardBridge.sol
View file @
70df096f
...
...
@@ -33,7 +33,7 @@ contract OVM_L2StandardBridge is iOVM_L2ERC20Bridge, OVM_CrossDomainEnabled {
* External Contract References *
********************************/
address public l1TokenBridge;
address public
override
l1TokenBridge;
/***************
* Constructor *
...
...
packages/contracts/contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L1ERC20Bridge.sol
View file @
70df096f
...
...
@@ -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
...
...
packages/contracts/contracts/optimistic-ethereum/iOVM/bridge/tokens/iOVM_L2ERC20Bridge.sol
View file @
70df096f
...
...
@@ -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.
...
...
packages/contracts/hardhat.config.ts
View file @
70df096f
...
...
@@ -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
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment