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
b9049406
Unverified
Commit
b9049406
authored
Nov 12, 2021
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: no gas price for static fns in deploy
parent
12b153ab
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
30 additions
and
23 deletions
+30
-23
lovely-pumas-sing.md
.changeset/lovely-pumas-sing.md
+5
-0
000-hardhat-setup.ts
packages/contracts/deploy/000-hardhat-setup.ts
+1
-1
002-OVM_ChainStorageContainer_ctc_batches.deploy.ts
...eploy/002-OVM_ChainStorageContainer_ctc_batches.deploy.ts
+1
-1
003-OVM_ChainStorageContainer_scc_batches.deploy.ts
...eploy/003-OVM_ChainStorageContainer_scc_batches.deploy.ts
+1
-1
004-OVM_CanonicalTransactionChain.deploy.ts
...tracts/deploy/004-OVM_CanonicalTransactionChain.deploy.ts
+1
-1
005-OVM_StateCommitmentChain.deploy.ts
...s/contracts/deploy/005-OVM_StateCommitmentChain.deploy.ts
+1
-1
006-OVM_BondManager.deploy.ts
packages/contracts/deploy/006-OVM_BondManager.deploy.ts
+1
-1
007-OVM_L1CrossDomainMessenger.deploy.ts
...contracts/deploy/007-OVM_L1CrossDomainMessenger.deploy.ts
+1
-1
008-Proxy__OVM_L1CrossDomainMessenger.deploy.ts
...ts/deploy/008-Proxy__OVM_L1CrossDomainMessenger.deploy.ts
+1
-1
009-Proxy__OVM_L1StandardBridge.deploy.ts
...ontracts/deploy/009-Proxy__OVM_L1StandardBridge.deploy.ts
+1
-1
010-AddressDictator.deploy.ts
packages/contracts/deploy/010-AddressDictator.deploy.ts
+1
-1
011-set-addresses.ts
packages/contracts/deploy/011-set-addresses.ts
+1
-4
012-initialize-Proxy__L1CrossDomainMessenger.ts
...ts/deploy/012-initialize-Proxy__L1CrossDomainMessenger.ts
+1
-1
013-ChugSplashDictator.deploy.ts
packages/contracts/deploy/013-ChugSplashDictator.deploy.ts
+1
-1
014-OVM_L1StandardBridge.deploy.ts
packages/contracts/deploy/014-OVM_L1StandardBridge.deploy.ts
+1
-1
015-finalize.ts
packages/contracts/deploy/015-finalize.ts
+1
-1
016-fund-accounts.ts
packages/contracts/deploy/016-fund-accounts.ts
+1
-4
deploy-utils.ts
packages/contracts/src/deploy-utils.ts
+9
-1
No files found.
.changeset/lovely-pumas-sing.md
0 → 100644
View file @
b9049406
---
'
@eth-optimism/contracts'
:
patch
---
Use a gas price of zero for static calls in the deploy process
packages/contracts/deploy/000-hardhat-setup.ts
View file @
b9049406
...
...
@@ -6,7 +6,7 @@ import {
fundAccount
,
sendImpersonatedTx
,
BIG_BALANCE
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
import
{
awaitCondition
}
from
'
@eth-optimism/core-utils
'
...
...
packages/contracts/deploy/002-OVM_ChainStorageContainer_ctc_batches.deploy.ts
View file @
b9049406
...
...
@@ -5,7 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/003-OVM_ChainStorageContainer_scc_batches.deploy.ts
View file @
b9049406
...
...
@@ -5,7 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/004-OVM_CanonicalTransactionChain.deploy.ts
View file @
b9049406
...
...
@@ -5,7 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/005-OVM_StateCommitmentChain.deploy.ts
View file @
b9049406
...
...
@@ -5,7 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/006-OVM_BondManager.deploy.ts
View file @
b9049406
...
...
@@ -5,7 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/007-OVM_L1CrossDomainMessenger.deploy.ts
View file @
b9049406
...
...
@@ -6,7 +6,7 @@ import { hexStringEquals, awaitCondition } from '@eth-optimism/core-utils'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/008-Proxy__OVM_L1CrossDomainMessenger.deploy.ts
View file @
b9049406
...
...
@@ -5,7 +5,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/009-Proxy__OVM_L1StandardBridge.deploy.ts
View file @
b9049406
...
...
@@ -2,7 +2,7 @@
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
/* Imports: Internal */
import
{
deployAndVerifyAndThen
}
from
'
../src/
hardhat-deploy-ether
s
'
import
{
deployAndVerifyAndThen
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/010-AddressDictator.deploy.ts
View file @
b9049406
...
...
@@ -6,7 +6,7 @@ import { hexStringEquals } from '@eth-optimism/core-utils'
import
{
deployAndVerifyAndThen
,
getContractFromArtifact
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
import
{
predeploys
}
from
'
../src/predeploys
'
...
...
packages/contracts/deploy/011-set-addresses.ts
View file @
b9049406
...
...
@@ -3,10 +3,7 @@ import { hexStringEquals, awaitCondition } from '@eth-optimism/core-utils'
import
{
DeployFunction
}
from
'
hardhat-deploy/dist/types
'
/* Imports: Internal */
import
{
getContractFromArtifact
,
isHardhatNode
,
}
from
'
../src/hardhat-deploy-ethers
'
import
{
getContractFromArtifact
,
isHardhatNode
}
from
'
../src/deploy-utils
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/012-initialize-Proxy__L1CrossDomainMessenger.ts
View file @
b9049406
...
...
@@ -3,7 +3,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
hexStringEquals
,
awaitCondition
}
from
'
@eth-optimism/core-utils
'
/* Imports: Internal */
import
{
getContractFromArtifact
}
from
'
../src/
hardhat-deploy-ether
s
'
import
{
getContractFromArtifact
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/013-ChugSplashDictator.deploy.ts
View file @
b9049406
...
...
@@ -8,7 +8,7 @@ import { getContractDefinition } from '../src/contract-defs'
import
{
getContractFromArtifact
,
deployAndVerifyAndThen
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/014-OVM_L1StandardBridge.deploy.ts
View file @
b9049406
...
...
@@ -9,7 +9,7 @@ import {
getContractFromArtifact
,
deployAndVerifyAndThen
,
isHardhatNode
,
}
from
'
../src/
hardhat-deploy-ether
s
'
}
from
'
../src/
deploy-util
s
'
import
{
names
}
from
'
../src/address-names
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
...
...
packages/contracts/deploy/015-finalize.ts
View file @
b9049406
...
...
@@ -3,7 +3,7 @@ import { DeployFunction } from 'hardhat-deploy/dist/types'
import
{
hexStringEquals
,
awaitCondition
}
from
'
@eth-optimism/core-utils
'
/* Imports: Internal */
import
{
getContractFromArtifact
}
from
'
../src/
hardhat-deploy-ether
s
'
import
{
getContractFromArtifact
}
from
'
../src/
deploy-util
s
'
const
deployFn
:
DeployFunction
=
async
(
hre
)
=>
{
const
{
deployer
}
=
await
hre
.
getNamedAccounts
()
...
...
packages/contracts/deploy/016-fund-accounts.ts
View file @
b9049406
...
...
@@ -5,10 +5,7 @@ import { defaultHardhatNetworkHdAccountsConfigParams } from 'hardhat/internal/co
import
{
normalizeHardhatNetworkAccountsConfig
}
from
'
hardhat/internal/core/providers/util
'
/* Imports: Internal */
import
{
getContractFromArtifact
,
isHardhatNode
,
}
from
'
../src/hardhat-deploy-ethers
'
import
{
getContractFromArtifact
,
isHardhatNode
}
from
'
../src/deploy-utils
'
import
{
names
}
from
'
../src/address-names
'
// This is a TEMPORARY way to fund the default hardhat accounts on L2. The better way to do this is
...
...
packages/contracts/src/
hardhat-deploy-ether
s.ts
→
packages/contracts/src/
deploy-util
s.ts
View file @
b9049406
...
...
@@ -103,8 +103,16 @@ export const getAdvancedContract = (opts: {
for
(
const
fnName
of
Object
.
keys
(
contract
.
functions
))
{
const
fn
=
contract
[
fnName
].
bind
(
contract
)
;(
contract
as
any
)[
fnName
]
=
async
(...
args
:
any
)
=>
{
// We want to use the gas price that has been configured at the beginning of the deployment.
// However, if the function being triggered is a "constant" (static) function, then we don't
// want to provide a gas price because we're prone to getting insufficient balance errors.
let
gasPrice
=
opts
.
hre
.
deployConfig
.
gasPrice
||
undefined
if
(
contract
.
interface
.
getFunction
(
fnName
).
constant
)
{
gasPrice
=
0
}
const
tx
=
await
fn
(...
args
,
{
gasPrice
:
opts
.
hre
.
deployConfig
.
gasprice
||
undefined
,
gasPrice
,
})
if
(
typeof
tx
!==
'
object
'
||
typeof
tx
.
wait
!==
'
function
'
)
{
...
...
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