Skip to content

Commit

Permalink
Merge branch 'develop' into feat/add-hardhat-deploy-instructions-to-r…
Browse files Browse the repository at this point in the history
…eadme
  • Loading branch information
karlfloersch authored May 28, 2021
2 parents a9231ec + 245136f commit 99697bf
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-books-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/l2geth': patch
---

Fixes incorrect type parsing in the RollupClient. The gasLimit became greater than the largest safe JS number so it needs to be represented as a string
5 changes: 5 additions & 0 deletions .changeset/cold-cows-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/integration-tests': patch
---

Reduce test timeout from 100 to 20 seconds
5 changes: 5 additions & 0 deletions .changeset/dull-fishes-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/data-transport-layer': patch
---

Represent gaslimit as a string to avoid an overflow
5 changes: 5 additions & 0 deletions .changeset/thin-waves-bathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/contracts': patch
---

Minor change to how deploy.ts is invoked
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
2 changes: 1 addition & 1 deletion integration-tests/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const enableGasReport = !!process.env.ENABLE_GAS_REPORT

const config: HardhatUserConfig = {
mocha: {
timeout: 100000,
timeout: 20000,
},
networks: {
optimism: {
Expand Down
2 changes: 1 addition & 1 deletion l2geth/rollup/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type signature struct {
type decoded struct {
Signature signature `json:"sig"`
Value hexutil.Uint64 `json:"value"`
GasLimit uint64 `json:"gasLimit"`
GasLimit uint64 `json:"gasLimit,string"`
GasPrice uint64 `json:"gasPrice"`
Nonce uint64 `json:"nonce"`
Target *common.Address `json:"target"`
Expand Down
2 changes: 0 additions & 2 deletions packages/contracts/bin/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env ts-node-script

import { Wallet } from 'ethers'
import path from 'path'
import dirtree from 'directory-tree'
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"lint:check": "yarn run lint:typescript",
"lint:typescript": "tslint --format stylish --project .",
"clean": "rm -rf ./dist ./artifacts ./artifacts-ovm ./cache ./cache-ovm ./tsconfig.build.tsbuildinfo",
"deploy": "./bin/deploy.ts && yarn generate-markdown",
"deploy": "ts-node \"./bin/deploy.ts\" && yarn generate-markdown",
"serve": "./bin/serve_dump.sh",
"prepublishOnly": "yarn copyfiles -u 2 \"contracts/optimistic-ethereum/**/*\" ./",
"postpublish": "rimraf OVM iOVM libraries mockOVM",
"prepack": "yarn prepublishOnly",
"postpack": "yarn postpublish",
"generate-markdown": "node scripts/generate-markdown.js"
"generate-markdown": "node \"./scripts/generate-markdown.js\""
},
"dependencies": {
"@eth-optimism/core-utils": "^0.4.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const maybeDecodeSequencerBatchTransaction = (
return {
nonce: BigNumber.from(decodedTx.nonce).toNumber(),
gasPrice: BigNumber.from(decodedTx.gasPrice).toNumber(),
gasLimit: BigNumber.from(decodedTx.gasLimit).toNumber(),
gasLimit: BigNumber.from(decodedTx.gasLimit).toString(),
value: toRpcHexString(decodedTx.value),
target: toHexString(decodedTx.to), // Maybe null this out for creations?
data: toHexString(decodedTx.data),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const handleSequencerBlock = {
s: padHexString(transaction.s, 32),
},
value: transaction.value,
gasLimit: BigNumber.from(transaction.gas).toNumber(),
gasLimit: BigNumber.from(transaction.gas).toString(),
gasPrice: BigNumber.from(transaction.gasPrice).toNumber(), // ?
nonce: BigNumber.from(transaction.nonce).toNumber(),
target: transaction.to,
Expand Down
2 changes: 1 addition & 1 deletion packages/data-transport-layer/src/types/database-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface DecodedSequencerBatchTransaction {
v: number
}
value: string
gasLimit: number
gasLimit: string
gasPrice: number
nonce: number
target: string
Expand Down

0 comments on commit 99697bf

Please sign in to comment.