Skip to content

Commit

Permalink
fix(options): maxGasPrice cannot be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Brenzee committed Nov 12, 2023
1 parent dadb87d commit 1183faf
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 349 deletions.
293 changes: 0 additions & 293 deletions Failing2.json

This file was deleted.

6 changes: 6 additions & 0 deletions scripts/gas.script.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
async function main() {}

main().catch((err) => {
console.error(err);
process.exit(1);
});
65 changes: 36 additions & 29 deletions scripts/test.script.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// Init dotenv
import * as dotenv from "dotenv";
import { writeFileSync } from "fs";

import { BatchMultiSigCall, ethers } from "../src";
import { transactionValidator } from "../src/utils";
import { BatchMultiSigCall } from "../src";
import FCTData from "./Failing.json";
import { scriptData } from "./scriptData";

dotenv.config();

Expand All @@ -14,33 +11,43 @@ const activator = "0x4c508dc4a3aacbecbf13c1d543b4936274033110";
async function main() {
const FCT = BatchMultiSigCall.from(FCTData);

writeFileSync("./Failing2.json", JSON.stringify(FCT.export(), null, 2));

const txValidator = await transactionValidator({
callData: FCT.utils.getCalldataForActuator({
activator: activator,
investor: ethers.constants.AddressZero,
purgedFCT: ethers.constants.HashZero,
signatures: [
FCT.utils.getAuthenticatorSignature(),
{
r: "0xe445c4c72b6f843b0e9b26ed199552021c37b5fabe1ce71498c5cbf156c6a9e6",
s: "0x213066e0db3d40e3249005a0aae3fa4e451b1cd24a2df378346401a4c9ab8886",
v: 28,
},
],
console.log(
FCT.utils.getPaymentPerPayer({
ethPriceInKIRO: "1" + "0".repeat(18),
penalty: "40000",
// ethPriceInKIRO: "1" + "0".repeat(18),
// gasPrice: ethers.utils.parseUnits("0.120750016", "gwei").toString(),
gasPrice: "13",
}),
activateForFree: false,
actuatorContractAddress: "0x862a8fb429195d735106c06c4e352e305d8c7b31",
activator: activator,
rpcUrl: scriptData[5].rpcUrl,
gasPrice: {
maxFeePerGas: ethers.utils.parseUnits("13", "gwei").toString(),
maxPriorityFeePerGas: ethers.utils.parseUnits("0.004", "gwei").toString(),
},
});
);

// const txValidator = await transactionValidator({
// callData: FCT.utils.getCalldataForActuator({
// activator: activator,
// investor: ethers.constants.AddressZero,
// purgedFCT: ethers.constants.HashZero,
// signatures: [
// FCT.utils.getAuthenticatorSignature(),
// {
// r: "0xe445c4c72b6f843b0e9b26ed199552021c37b5fabe1ce71498c5cbf156c6a9e6",
// s: "0x213066e0db3d40e3249005a0aae3fa4e451b1cd24a2df378346401a4c9ab8886",
// v: 28,
// },
// ],
// }),
// activateForFree: false,
// actuatorContractAddress: "0x862a8fb429195d735106c06c4e352e305d8c7b31",
// activator: activator,
// rpcUrl: scriptData[5].rpcUrl,
// gasPrice: {
// // maxFeePerGas: ethers.utils.parseUnits("13", "gwei").toString(),
// // maxPriorityFeePerGas: ethers.utils.parseUnits("0.004", "gwei").toString(),
// maxFeePerGas: "14",
// maxPriorityFeePerGas: "2",
// },
// });

console.log(txValidator);
// console.log(txValidator);
}

main()
Expand Down
2 changes: 1 addition & 1 deletion scripts/test2.script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function main() {
from: createRandomAddress(),
});

call.getOutputVariable;
// call.getOutputVariable;

const FCTData = FCT.export();

Expand Down
Loading

0 comments on commit 1183faf

Please sign in to comment.