This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Greeter = artifacts.require("Greeter"); | |
| module.exports = async function (deployer, network, accounts) { | |
| // await deployer.deploy(Greeter); | |
| // replace with: | |
| const [ owner ] = accounts; | |
| const lastNonce = await web3.eth.getTransactionCount(owner); | |
| // this DOESN'T include pending transactions, so lastNonce + 1 always replaces pending |