Skip to content

Commit

Permalink
Updates deploy-ovm-pair cmd to latest optimism-integration (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
theethernaut committed Dec 12, 2020
1 parent bc37c93 commit 9c31432
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 79 deletions.
204 changes: 139 additions & 65 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions publish/src/Deployer.js
Expand Up @@ -222,20 +222,6 @@ class Deployer {
});
deployedContract.options.address = '0x' + this._dryRunCounter.toString().padStart(40, '0');
} else {
const nonce = await this.web3.eth.getTransactionCount(this.account);

// Known OVM bug. EOA nonces start with 0, when they should start with 1.
// Compensate by sending a dummy tx.
if (this.useOvm && nonce === 0) {
console.log(
yellow(
`⚠ WARNING: Deployer nonce is 0. This will cause problems in deployments. Sending a dummy tx to increase the nonce...`
)
);

await this.sendDummyTx();
}

// If the contract creation will result in an address that's unsafe for OVM,
// increment the tx nonce until its not.
// Quite commonly, deployed contract addresses will be used as constructor arguments of
Expand Down

0 comments on commit 9c31432

Please sign in to comment.