Skip to content
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
28 changes: 1 addition & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ commands:
- run:
name: Bring up services
command: |
docker-compose -f <<parameters.docker_compose_file>> -f docker-compose-side.yml up -d bobalink aa_deployer
docker-compose -f <<parameters.docker_compose_file>> -f docker-compose-side.yml up -d bobalink aa_deployer bundler
working_directory: ops
- run:
name: Start background logging
Expand Down Expand Up @@ -167,31 +167,6 @@ jobs:
command: make <<parameters.binary_name>>
working_directory: <<parameters.working_directory>>

test_flow_bundler_and_depcheck:
docker: # run the steps with Docker
- image: cimg/node:16.6.2
steps: # a collection of executable commands
- checkout
- attach_workspace:
at: .
- run: # run hardhat-node as standalone process fork
command: yarn && yarn build
working_directory: ./
- run: # run hardhat-node as standalone process fork
name: hardhat-node-process
command: yarn hardhat-node
background: true
working_directory: ./packages/boba/bundler
- run: # run tests
name: test
command: yarn test-flows | tee /tmp/test-flows-results.log
working_directory: ./packages/boba/bundler
- run:
name: depcheck
command: yarn depcheck
working_directory: ./packages/boba/bundler
- store_test_results: # special step to upload test results for display in Test Summary
path: /tmp/test-flow-results.log
integration-tests:
executor: intergration-tests-executor
parallelism: 4
Expand Down Expand Up @@ -254,5 +229,4 @@ workflows:
name: proxyd-tests
binary_name: proxyd
working_directory: go/proxyd
# - test_flow_bundler_and_depcheck

23 changes: 23 additions & 0 deletions .github/workflows/aa-bundler-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish AA-Bundler to NPM
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: yarn install --frozen-lockfile --legacy-peer-deps && yarn run build
- name: Publish package on NPM 📦
working-directory: ./packages/boba/bundler_sdk
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOBA_FOUNDATION }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ temp
coverage.json
*.tsbuildinfo

integration-tests/result/output.xml

env.yml
env.yaml
.aws-sam/
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
},
"eslint.workingDirectories": [
Expand Down
1 change: 0 additions & 1 deletion integration-tests/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HardhatUserConfig } from 'hardhat/types'

// Hardhat plugins
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
"@openzeppelin/test-helpers": "^0.5.15",
"@boba/api": "0.0.1",
"@boba/contracts": "0.0.1",
"@boba/accountabstraction": "1.0.0",
"@eth-optimism/contracts": "^0.5.11",
"@eth-optimism/core-utils": "0.8.1",
"@eth-optimism/sdk": "1.0.1",
"@boba/bundler_sdk": "0.2.3",
"@ethersproject/abstract-provider": "^5.5.0",
"@ethersproject/providers": "^5.5.3",
"@ethersproject/transactions": "^5.5.0",
Expand Down
12 changes: 12 additions & 0 deletions integration-tests/test/alt-l2/nft_bridge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ describe('NFT Bridge Test', async () => {
const ownerL1 = await L1ERC721.ownerOf(DUMMY_TOKEN_ID)
const ownerL2 = await L2ERC721.ownerOf(DUMMY_TOKEN_ID)

const depositMap = await L1Bridge.deposits(L1ERC721.address, DUMMY_TOKEN_ID)

expect(ownerL1).to.deep.eq(L1Bridge.address)
expect(ownerL2).to.deep.eq(env.l2Wallet.address)
expect(depositMap).to.deep.eq(L2ERC721.address)
})

it('should be able to transfer NFT on L2', async () => {
Expand Down Expand Up @@ -155,6 +158,9 @@ describe('NFT Bridge Test', async () => {

const ownerL1 = await L1ERC721.ownerOf(DUMMY_TOKEN_ID)
expect(ownerL1).to.be.deep.eq(env.l2Wallet_2.address)

const depositMap = await L1Bridge.deposits(L1ERC721.address, DUMMY_TOKEN_ID)
expect(depositMap).to.deep.eq(ethers.constants.AddressZero)
})

it('should deposit NFT to another L2 wallet', async () => {
Expand Down Expand Up @@ -410,8 +416,11 @@ describe('NFT Bridge Test', async () => {
const ownerL1 = await L1ERC721.ownerOf(DUMMY_TOKEN_ID)
const ownerL2 = await L2ERC721.ownerOf(DUMMY_TOKEN_ID)

const exitsMap = await L2Bridge.exits(L2ERC721.address, DUMMY_TOKEN_ID)

expect(ownerL1).to.deep.eq(env.l2Wallet.address)
expect(ownerL2).to.deep.eq(L2Bridge.address)
expect(exitsMap).to.deep.eq(L1ERC721.address)
})

it('should be able to transfer NFT on L1', async () => {
Expand Down Expand Up @@ -462,6 +471,9 @@ describe('NFT Bridge Test', async () => {

const ownerL2 = await L2ERC721.ownerOf(DUMMY_TOKEN_ID)
expect(ownerL2).to.deep.eq(env.l2Wallet.address)

const exitsMap = await L2Bridge.exits(L2ERC721.address, DUMMY_TOKEN_ID)
expect(exitsMap).to.deep.eq(ethers.constants.AddressZero)
})

it('should fail to exit NFT to another L1 wallet if not paying enough Boba', async () => {
Expand Down
9 changes: 8 additions & 1 deletion integration-tests/test/alt-l2/turing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ chai.use(solidity)

import { OptimismEnv } from './shared/env'
import { verifyStateRoots } from './shared/state-root-verification'
import { Server } from "http";

describe('Turing 256 Bit Random Number Test', async () => {
let env: OptimismEnv
Expand All @@ -23,6 +24,12 @@ describe('Turing 256 Bit Random Number Test', async () => {
const apiPort = 5123
let URL: string

let server: Server

after(async () => {
await server.close(console.error)
})

before(async () => {
env = await OptimismEnv.new()

Expand Down Expand Up @@ -79,7 +86,7 @@ describe('Turing 256 Bit Random Number Test', async () => {
const http = require('http')
const ip = require("ip")
// start local server
const server = module.exports = http.createServer(async function (req, res) {
server = module.exports = http.createServer(async function (req, res) {

if (req.headers['content-type'] === 'application/json') {

Expand Down
Loading