Skip to content

Commit

Permalink
chore: updated ethers (#84)
Browse files Browse the repository at this point in the history
* chore: updated ethers and aligned TransactionRequest and TransactionResponse imports

* chore: linted

* fix: added eip1559 gas properties to simulation options
  • Loading branch information
jstashh authored Aug 10, 2021
1 parent 5e76f13 commit b70644d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 16 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
"peerDependencies": {
"@ethersproject/abi": "^5.4.0",
"@ethersproject/address": "^5.4.0",
"@ethersproject/bignumber": "^5.4.0",
"@ethersproject/contracts": "^5.4.0",
"@ethersproject/providers": "^5.4.1"
"@ethersproject/bignumber": "^5.4.1",
"@ethersproject/contracts": "^5.4.1",
"@ethersproject/providers": "^5.4.3"
},
"devDependencies": {
"@ethersproject/abi": "^5.4.0",
"@ethersproject/address": "^5.4.0",
"@ethersproject/bignumber": "^5.4.0",
"@ethersproject/contracts": "^5.4.0",
"@ethersproject/providers": "^5.4.1",
"@ethersproject/bignumber": "^5.4.1",
"@ethersproject/contracts": "^5.4.1",
"@ethersproject/providers": "^5.4.3",
"@size-limit/preset-small-lib": "^4.10.1",
"@solidity-parser/parser": "^0.12.0",
"apollo": "^2.33.0",
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/token.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
import { CallOverrides, Contract } from "@ethersproject/contracts";
import { TransactionRequest, TransactionResponse } from "@ethersproject/providers";
import BigNumber from "bignumber.js";

import { ChainId } from "../chain";
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/vault.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider";
import { BigNumber } from "@ethersproject/bignumber";
import { CallOverrides, Contract } from "@ethersproject/contracts";
import { TransactionRequest, TransactionResponse } from "@ethersproject/providers";
import { JsonRpcSigner } from "@ethersproject/providers";

import { ChainId } from "../chain";
Expand Down
4 changes: 4 additions & 0 deletions src/simulationExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ export class SimulationExecutor {
gasLimit: options.gasLimit,
gasPrice: options.gasPrice
};
if (!options.gasPrice) {
transactionRequest.maxFeePerGas = options.maxFeePerGas || "0";
transactionRequest.maxPriorityFeePerGas = options.maxPriorityFeePerGas || "0";
}

const result = await signer.populateTransaction(transactionRequest);

Expand Down
2 changes: 2 additions & 0 deletions src/types/custom/simulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export interface SimulationOptions {
root?: string;
forkId?: string;
gasPrice?: Integer;
maxFeePerGas?: Integer;
maxPriorityFeePerGas?: Integer;
gasLimit?: Integer;
save?: boolean;
}
25 changes: 17 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,15 @@
"@ethersproject/logger" "^5.4.0"
bn.js "^4.11.9"

"@ethersproject/bignumber@^5.4.1":
version "5.4.1"
resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d"
integrity sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg==
dependencies:
"@ethersproject/bytes" "^5.4.0"
"@ethersproject/logger" "^5.4.0"
bn.js "^4.11.9"

"@ethersproject/bytes@^5.4.0":
version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e"
Expand All @@ -1073,10 +1082,10 @@
dependencies:
"@ethersproject/bignumber" "^5.4.0"

"@ethersproject/contracts@^5.4.0":
version "5.4.0"
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.0.tgz#e05fe6bd33acc98741e27d553889ec5920078abb"
integrity sha512-hkO3L3IhS1Z3ZtHtaAG/T87nQ7KiPV+/qnvutag35I0IkiQ8G3ZpCQ9NNOpSCzn4pWSW4CfzmtE02FcqnLI+hw==
"@ethersproject/contracts@^5.4.1":
version "5.4.1"
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470"
integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w==
dependencies:
"@ethersproject/abi" "^5.4.0"
"@ethersproject/abstract-provider" "^5.4.0"
Expand Down Expand Up @@ -1130,10 +1139,10 @@
dependencies:
"@ethersproject/logger" "^5.4.0"

"@ethersproject/providers@^5.4.1":
version "5.4.1"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.1.tgz#654267b563b833046b9c9647647cfc8267cb93b4"
integrity sha512-p06eiFKz8nu/5Ju0kIX024gzEQIgE5pvvGrBCngpyVjpuLtUIWT3097Agw4mTn9/dEA0FMcfByzFqacBMSgCVg==
"@ethersproject/providers@^5.4.3":
version "5.4.3"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.3.tgz#4cd7ccd9e12bc3875b33df8b24abf735663958a5"
integrity sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg==
dependencies:
"@ethersproject/abstract-provider" "^5.4.0"
"@ethersproject/abstract-signer" "^5.4.0"
Expand Down

0 comments on commit b70644d

Please sign in to comment.