Skip to content

Commit

Permalink
Update typescript and abi generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalodner committed Aug 8, 2021
1 parent f1af497 commit e15934c
Show file tree
Hide file tree
Showing 418 changed files with 58,507 additions and 49,109 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
plugins: ['@typescript-eslint', 'prettier'],
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ repos:
hooks:
- id: go-fmt
- repo: https://github.com/pre-commit/mirrors-prettier
rev: 'v2.2.1' # Use the sha or tag you want to point at
rev: 'v2.3.2' # Use the sha or tag you want to point at
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-eslint
rev: 'v7.24.0' # Use the sha / tag you want to point at
rev: 'v7.32.0' # Use the sha / tag you want to point at
hooks:
- id: eslint
args: [--fix]
types: [text]
# ignore prettier config
files: \.[jt]sx?$
additional_dependencies:
- 'eslint@7.3.1'
- 'typescript@3.8.3'
- '@typescript-eslint/parser@3.4.0'
- '@typescript-eslint/eslint-plugin@3.4.0'
- eslint-config-prettier@6.11.0
- 'eslint@7.32.0'
- 'typescript@4.3.5'
- '@typescript-eslint/parser@4.29.0'
- '@typescript-eslint/eslint-plugin@4.29.0'
- eslint-config-prettier@8.3.0
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.16
hooks:
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"docker:parity": "yarn workspace arb-bridge-eth docker:parity",
"docker:ganache": "yarn workspace arb-bridge-eth docker:ganache",
"docker:geth": "yarn workspace arb-bridge-eth docker:geth",
"prepare": "yarn workspace arb-ts prepare",
"go:vet": "./scripts/run-go-packages \"go list ./... | grep -v 'arb-node-core/ethbridge[^/]*contracts' | xargs go vet\"",
"go:generate": "./scripts/run-go-packages 'go generate ./...'",
"go:tidy": "./scripts/run-go-packages 'go mod tidy'",
Expand Down Expand Up @@ -53,12 +52,12 @@
]
},
"devDependencies": {
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-mocha": "^7.0.1",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^2.0.5",
"prettier-plugin-solidity": "^1.0.0-alpha.54",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-prettier": "^3.4.0",
"prettier": "^2.3.2",
"prettier-plugin-solidity": "^1.0.0-beta.17",
"solidity-docgen": "^0.5.11"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/MACHINEHASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0x926a1ae0edabcb839a8c58ecf503883a9813d5b60baca3a275554a7cd2113a10
0x468c577222cf652850b1a9e6296355722a400db2daf6954d8b73c152cd97e8d3
2 changes: 1 addition & 1 deletion packages/arb-bridge-eth/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as fs from 'fs'
import 'hardhat-deploy'

import '@nomiclabs/hardhat-waffle'
import 'hardhat-typechain'
import '@typechain/hardhat'
import 'solidity-coverage'
import 'hardhat-spdx-license-identifier'
import 'hardhat-gas-reporter'
Expand Down
26 changes: 13 additions & 13 deletions packages/arb-bridge-eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,42 +41,42 @@
"@openzeppelin/contracts-upgradeable": "3.4.0",
"@types/node": "^14.0.13",
"dotenv": "^8.2.0",
"ethers": "^5.0.24",
"ethers": "^5.1.0",
"hardhat-deploy": "^0.7.0-beta.40",
"ts-node": "^9.0.0",
"typescript": "^4.0.2"
"typescript": "^4.2.2"
},
"devDependencies": {
"@codechecks/client": "^0.1.10",
"@nomiclabs/hardhat-ethers": "^2.0.1",
"@nomiclabs/hardhat-etherscan": "^2.1.0",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@typechain/ethers-v5": "^5.0.0",
"@typechain/ethers-v5": "^7.0.1",
"@typechain/hardhat": "^2.3.0",
"@types/chai": "^4.2.11",
"@types/chai-as-promised": "^7.1.2",
"@types/mocha": "^8.2.0",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"@typescript-eslint/eslint-plugin": "^4.29.0",
"@typescript-eslint/parser": "^4.29.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"dotenv-cli": "^4.0.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-prettier": "^3.4.0",
"ethereum-waffle": "^3.2.0",
"hardhat": "^2.0.11",
"hardhat-gas-reporter": "^1.0.4",
"hardhat-spdx-license-identifier": "^2.0.2",
"hardhat-typechain": "^0.3.4",
"mocha": "^8.2.1",
"mocha-junit-reporter": "^2.0.0",
"prettier": "^2.0.5",
"prettier-plugin-solidity": "^1.0.0-beta.3",
"prettier": "^2.3.2",
"prettier-plugin-solidity": "^1.0.0-beta.17",
"solhint": "^3.2.0",
"solhint-plugin-prettier": "^0.0.5",
"solidity-coverage": "^0.7.13",
"ts-generator": "^0.1.1",
"typechain": "^4.0.0"
"typechain": "^5.1.2"
}
}
28 changes: 14 additions & 14 deletions packages/arb-bridge-eth/test/arbRollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ import { ContractTransaction } from '@ethersproject/contracts'
import { TransactionResponse } from '@ethersproject/providers'
import { assert, expect } from 'chai'
import { Rollup } from '../build/types/Rollup'
import { Node as NodeCon } from '../build/types/Node'
import { RollupCreatorNoProxy } from '../build/types/RollupCreatorNoProxy'
import { RollupCreatorNoProxy__factory } from '../build/types/factories/RollupCreatorNoProxy__factory'
import { Challenge } from '../build/types/Challenge'
// import { RollupTester } from '../build/types/RollupTester'
import { initializeAccounts } from './utils'
Expand All @@ -35,6 +32,7 @@ import {
Assertion,
RollupContract,
} from './rolluplib'
import { RollupUserFacet } from '../build/types'

const initialVmState =
'0x9900000000000000000000000000000000000000000000000000000000000000'
Expand All @@ -55,13 +53,13 @@ let challenge: Challenge
let accounts: Signer[]

async function createRollup(): Promise<{
rollupCon: Rollup
rollupCon: RollupUserFacet
blockCreated: number
}> {
const ChallengeFactory = await deployments.get('ChallengeFactory')
const RollupCreatorNoProxy = (await ethers.getContractFactory(
const RollupCreatorNoProxy = await ethers.getContractFactory(
'RollupCreatorNoProxy'
)) as RollupCreatorNoProxy__factory
)
const rollupCreator = await RollupCreatorNoProxy.deploy(
ChallengeFactory.address,
initialVmState,
Expand All @@ -77,7 +75,9 @@ async function createRollup(): Promise<{
'0x'
)

const receipt = await (rollupCreator.deployTransaction as TransactionResponse).wait()
const receipt = await (
rollupCreator.deployTransaction as TransactionResponse
).wait()
if (receipt.logs == undefined) {
throw Error('expected receipt to have logs')
}
Expand All @@ -86,7 +86,7 @@ async function createRollup(): Promise<{
receipt.logs[receipt.logs.length - 1]
)
expect(ev.name).to.equal('RollupCreated')
const parsedEv = (ev as any) as { args: { rollupAddress: string } }
const parsedEv = ev as any as { args: { rollupAddress: string } }

const Rollup = (await ethers.getContractFactory('RollupUserFacet')).connect(
accounts[8]
Expand All @@ -105,7 +105,7 @@ async function createRollup(): Promise<{
[true, true, true]
)

const rollupCon = Rollup.attach(parsedEv.args.rollupAddress) as Rollup
const rollupCon = Rollup.attach(parsedEv.args.rollupAddress)

return {
rollupCon: rollupCon,
Expand Down Expand Up @@ -177,7 +177,7 @@ describe('ArbRollup', () => {
const nodeAddress = await rollup.getNode(originalNode)

const NodeContract = await ethers.getContractFactory('Node')
const node = NodeContract.attach(nodeAddress) as NodeCon
const node = NodeContract.attach(nodeAddress)

const newState = new NodeState(
new ExecutionState(0, initialVmState, 0, 0, 0, zerobytes32, zerobytes32),
Expand Down Expand Up @@ -294,9 +294,9 @@ describe('ArbRollup', () => {
receipt.logs![receipt.logs!.length - 1]
)
expect(ev.name).to.equal('RollupChallengeStarted')
const parsedEv = (ev as any) as { args: { challengeContract: string } }
const parsedEv = ev as any as { args: { challengeContract: string } }
const Challenge = await ethers.getContractFactory('Challenge')
challenge = Challenge.attach(parsedEv.args.challengeContract) as Challenge
challenge = Challenge.attach(parsedEv.args.challengeContract)
})

it('should make a new node', async function () {
Expand Down Expand Up @@ -349,9 +349,9 @@ describe('ArbRollup', () => {
receipt.logs![receipt.logs!.length - 1]
)
expect(ev.name).to.equal('RollupChallengeStarted')
const parsedEv = (ev as any) as { args: { challengeContract: string } }
const parsedEv = ev as any as { args: { challengeContract: string } }
const Challenge = await ethers.getContractFactory('Challenge')
challenge = Challenge.attach(parsedEv.args.challengeContract) as Challenge
challenge = Challenge.attach(parsedEv.args.challengeContract)
})

it('challenger should reply in challenge', async function () {
Expand Down
32 changes: 16 additions & 16 deletions packages/arb-bridge-eth/test/rolluplib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@ethersproject/contracts'
import { BytesLike } from '@ethersproject/bytes'

import { Rollup } from '../build/types/Rollup'
import { RollupUserFacet } from '../build/types/RollupUserFacet'
import { Bridge } from '../build/types/Bridge'

const zerobytes32 =
Expand Down Expand Up @@ -273,7 +273,7 @@ export interface NodeCreatedEvent {
}

export class RollupContract {
constructor(public rollup: Rollup) {}
constructor(public rollup: RollupUserFacet) {}

connect(signerOrProvider: Signer | Provider | string): RollupContract {
return new RollupContract(this.rollup.connect(signerOrProvider))
Expand Down Expand Up @@ -319,7 +319,7 @@ export class RollupContract {
if (ev.name != 'NodeCreated') {
throw 'wrong event type'
}
const parsedEv = (ev as any) as {
const parsedEv = ev as any as {
args: NodeCreatedEvent
}
const node = new Node(
Expand Down Expand Up @@ -394,12 +394,12 @@ export class RollupContract {
return this.rollup.returnOldDeposit(stakerAddress)
}

removeZombieStaker(
nodeNum: BigNumberish,
stakerAddress: string
): Promise<ContractTransaction> {
return this.rollup.removeZombieStaker(nodeNum, stakerAddress)
}
// removeZombieStaker(
// nodeNum: BigNumberish,
// stakerAddress: string
// ): Promise<ContractTransaction> {
// return this.rollup.removeZombieStaker(nodeNum, stakerAddress)
// }

latestConfirmed(): Promise<BigNumber> {
return this.rollup.latestConfirmed()
Expand All @@ -409,13 +409,13 @@ export class RollupContract {
return this.rollup.getNode(index)
}

async inboxMaxValue(): Promise<BytesLike> {
const bridgeAddress = await this.rollup.bridge()
const Bridge = await ethers.getContractFactory('Bridge')
const bridge = Bridge.attach(bridgeAddress) as Bridge
const inboxInfo = await bridge.inboxInfo()
return inboxInfo[1]
}
// async inboxMaxValue(): Promise<BytesLike> {
// const bridgeAddress = await this.rollup.delayedBridge()
// const Bridge = await ethers.getContractFactory('Bridge')
// const bridge = Bridge.attach(bridgeAddress) as Bridge
// const inboxInfo = await bridge.inboxInfo()
// return inboxInfo[1]
// }

currentRequiredStake(): Promise<BigNumber> {
return this.rollup.currentRequiredStake()
Expand Down
2 changes: 1 addition & 1 deletion packages/arb-bridge-eth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"outDir": "dist",
"resolveJsonModule": true
},
"include": ["./scripts", "./test", "./deploy"],
"include": ["./scripts", "./test", "./deploy", "./build/**/*.ts"],
"files": ["./hardhat.config.ts"]
}
4 changes: 2 additions & 2 deletions packages/arb-bridge-peripherals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"hardhat": "^2.0.7",
"sol2uml": "^1.1.25",
"ts-node": "^9.1.1",
"typechain": "^4.0.0",
"typescript": "^4.1.5"
"typechain": "^5.1.2",
"typescript": "^4.2.2"
},
"optionalDependencies": {
"@openzeppelin/upgrades-core": "^1.7.6"
Expand Down
Loading

0 comments on commit e15934c

Please sign in to comment.