Skip to content

Commit

Permalink
Make users send funds so we can deploy the singleton
Browse files Browse the repository at this point in the history
- Add funds estimation to the estimate command
  • Loading branch information
Uxio0 committed Sep 28, 2023
1 parent eb34caa commit 86c8cad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/request_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ about: Request to add the deployment information for a new network
- ChainId:
- RPC http/s address:
- Link to https://chainlist.org/
- Blockexplorer:

When we provide a PR please deploy the singleton and if possible post an answer on this issue with the links to the blockexplorer addresses.
- (Optional) Blockexplorer:
- [] I have run `RPC='http://my-rpc-address' yarn estimate`
- [] I have sent `requiredFunds` to `0xE1CB04A0fA36DdD16a06ea828007E35e1a3cBC37`
3 changes: 2 additions & 1 deletion scripts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export async function estimateDeploymentTransaction(rpcUrl: string): Promise<Dep
console.log({estimate: gasLimit.toString() })
const gasPrice = await provider.getGasPrice()
console.log({gasPriceGwei: ethers.utils.formatUnits(gasPrice, "gwei"), gasPrice: gasPrice.toString() })
console.log({requiredFunds: ethers.utils.formatUnits(gasPrice.mul(gasLimit), "ether") })
return { chainId, gasLimit, gasPrice }
}

Expand All @@ -75,4 +76,4 @@ export async function createDeploymentTransaction(chainId: number, options?: { g
await ensureDirectoryExists(path.join(__dirname, '..', 'artifacts', `${chainId}`))
await writeBytecode(contract.evm.bytecode.object)
await writeFactoryDeployerTransaction(contract, chainId, options)
}
}

0 comments on commit 86c8cad

Please sign in to comment.