Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #242 from omgnetwork/boba-nft-mainnet
Browse files Browse the repository at this point in the history
Deployed NFT bridges and support extra burn in gas oracle
  • Loading branch information
CAPtheorem authored Dec 23, 2021
2 parents 0b8a3f1 + 1d5c439 commit 8d319d9
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 2,130 deletions.
8 changes: 4 additions & 4 deletions integration-tests/test/boba_fixed_savings.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ describe('Boba Fixed Savings', async () => {
const depositTime = stakeData.depositTimestamp
await expect(
FixedSavings.connect(env.l2Wallet.address).unstake(stakeData.stakeId)
).to.be.revertedWith('Not on unstaking period')
).to.be.revertedWith('Not in unstaking period')

// advance time until the end of lock period
const expectedLockEndTime = depositTime.add(BigNumber.from(LOCK_TIME))
Expand All @@ -351,10 +351,10 @@ describe('Boba Fixed Savings', async () => {
.sub(BigNumber.from(3600))

await moveTimeForward(timeToMove.toNumber())
// still not on unstaking period
// still not in unstaking period
await expect(
FixedSavings.connect(env.l2Wallet).unstake(stakeData.stakeId)
).to.be.revertedWith('Not on unstaking period')
).to.be.revertedWith('Not in unstaking period')
})

let preBalanceStaker
Expand Down Expand Up @@ -456,7 +456,7 @@ describe('Boba Fixed Savings', async () => {
await moveTimeForward(timeToMove.toNumber())
await expect(
FixedSavings.connect(env.l2Wallet).unstake(stakeData.stakeId)
).to.be.revertedWith('Not on unstaking period')
).to.be.revertedWith('Not in unstaking period')
// this is the start of second period
})

Expand Down
2 changes: 2 additions & 0 deletions ops/docker/Dockerfile.boba_gas-price-oracle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ WORKDIR /opt/optimism/

COPY --from=builder /optimism/*.json /optimism/yarn.lock ./
COPY --from=builder /optimism/node_modules ./node_modules
# copy @boba package
COPY --from=builder /optimism/packages/boba/contracts ./node_modules/@boba/contracts

# copy deps (would have been nice if docker followed the symlinks required)
COPY --from=builder /optimism/packages/core-utils/package.json ./packages/core-utils/package.json
Expand Down
9 changes: 5 additions & 4 deletions packages/boba/contracts/contracts/bridges/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ await tx.wait()

## Native L2 NFT

The L2 NFT creator should deploy [L1StandardERC721](https://github.com/omgnetwork/optimism-v2/tree/develop/packages/boba/contracts/contracts/standards) on the Boba Network.
The L2 NFT creator should deploy [L1StandardERC721](https://github.com/omgnetwork/optimism-v2/tree/develop/packages/boba/contracts/contracts/standards) on the Mainnet.

```js
const Factory__L2StandardERC721 = new ethers.ContractFactory(
Expand Down Expand Up @@ -149,9 +149,10 @@ await tx.wait()

### Mainnet

| Contract Name | Contract Address |
| ------------- | ---------------- |
| | |
| Contract Name | Contract Address |
| ------------------ | ------------------------------------------ |
| Proxy__L1NFTBridge | 0xC891F466e53f40603250837282eAE4e22aD5b088 |
| Proxy__L2NFTBridge | 0xFB823b65D0Dc219fdC0d759172D1E098dA32f9eb |

### Rinkeby

Expand Down
18 changes: 18 additions & 0 deletions packages/boba/contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
import { HardhatUserConfig } from 'hardhat/types'
import * as dotenv from 'dotenv'

// Hardhat plugins
import 'hardhat-deploy'
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import "@nomiclabs/hardhat-etherscan"
import './tasks/deploy'

// Load environment variables from .env
dotenv.config()

// Fix lint
if (!process.env.L1_NODE_WEB3_URL) {
process.env.L1_NODE_WEB3_URL = 'http://localhost:9545'
}

const config: HardhatUserConfig = {
mocha: {
timeout: 300000,
Expand All @@ -21,6 +33,9 @@ const config: HardhatUserConfig = {
'0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
],
},
mainnet: {
url: process.env.L1_NODE_WEB3_URL,
},
},
solidity: {
compilers: [
Expand Down Expand Up @@ -67,6 +82,9 @@ const config: HardhatUserConfig = {
default: 0,
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY,
},
}

export default config
1 change: 1 addition & 0 deletions packages/boba/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@eth-optimism/core-utils": "^0.6.0",
"@ethersproject/abstract-provider": "^5.5.1",
"@ethersproject/abstract-signer": "^5.5.0",
"@nomiclabs/hardhat-etherscan": "^2.1.8",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "4.3.2",
"chalk": "^4.1.1",
Expand Down
1 change: 1 addition & 0 deletions packages/boba/gas-price-oracle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
],
"license": "MIT",
"devDependencies": {
"@boba/contracts": "0.0.1",
"@eth-optimism/contracts": "^0.4.1",
"@eth-optimism/core-utils": "^0.5.1",
"@ethersproject/providers": "^5.0.24",
Expand Down
89 changes: 0 additions & 89 deletions packages/boba/gas-price-oracle/src/abi/DiscretionaryExitBurn.json

This file was deleted.

Loading

0 comments on commit 8d319d9

Please sign in to comment.