Skip to content

Commit

Permalink
♻️ Enhance variable names
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio committed Dec 13, 2023
1 parent 7a9286b commit b812abf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ async function deployNormal() {
const createx = await createxFactory.deploy();

await createx.waitForDeployment();
const contractAddress = await createx.getAddress();
const createxAddress = await createx.getAddress();

console.log("CreateX deployed to:", contractAddress);
console.log("CreateX deployed to:", createxAddress);

await delay(30000); // Wait for 30 seconds before verifying the contract
await delay(30000); // Wait for 30 seconds before verifying `CreateX`

await hre.run("verify:verify", {
address: contractAddress,
address: createxAddress,
});
}

Expand All @@ -63,8 +63,8 @@ async function deployRaw() {
const tx = await hre.ethers.provider.broadcastTransaction(signedTx);
console.log("Transaction hash: " + `${GREEN}${tx.hash}${RESET}`);
const transactionReceipt = await tx.wait();
const contractAddress = transactionReceipt?.contractAddress;
console.log("Contract address: " + `${GREEN}${contractAddress}${RESET}`);
const createxAddress = transactionReceipt?.contractAddress;
console.log("Contract address: " + `${GREEN}${createxAddress}${RESET}`);

// Save the transaction receipt in a JSON file
if (!fs.existsSync(dir)) {
Expand All @@ -80,10 +80,10 @@ async function deployRaw() {
);
console.log(`Transaction details written to: ${GREEN}${saveDir}${RESET}\n`);

await delay(30000); // Wait for 30 seconds before verifying the contract
await delay(30000); // Wait for 30 seconds before verifying `CreateX`

await hre.run("verify:verify", {
address: contractAddress,
address: createxAddress,
});
} catch (err) {
// Save the transaction error in a JSON file
Expand Down
2 changes: 1 addition & 1 deletion scripts/presign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function presign() {
tx.to = null; // A contract creation transaction has a `to` address of `null`
tx.gasLimit = 3_000_000; // A normal deployment currently costs 2,580,902 gas
tx.gasPrice = hre.ethers.parseUnits("100", "gwei"); // A gas price of 100 gwei
tx.data = initCode; // Contract creation bytecode
tx.data = initCode; // Contract creation bytecode of `CreateX`
tx.chainId = 0; // Disable EIP-155 functionality (https://github.com/ethers-io/ethers.js/blob/bbcfb5f6b88800b8ef068e4a2923675503320e33/src.ts/transaction/transaction.ts#L168)
tx.nonce = 0; // It must be the first transaction of the deployer account
tx.type = 0; // Set to legacy transaction type 0
Expand Down

0 comments on commit b812abf

Please sign in to comment.