Skip to content

Commit

Permalink
Add missing value field to write method (#43)
Browse files Browse the repository at this point in the history
* Add missing value field to write method

* Add changeset
  • Loading branch information
DannyDelott authored Feb 22, 2024
1 parent d6f1b87 commit 23ae786
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-suits-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@delvtech/evm-client-viem": patch
---

Add missing `value` field to readWriteContract.write() method arguments
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function createSimulateContractParameters(
maxFeePerGas,
maxPriorityFeePerGas,
nonce,
value
} = options || {};

const gasPriceOptions =
Expand All @@ -25,6 +26,7 @@ export function createSimulateContractParameters(
accessList,
account: from,
gas,
value,
...gasPriceOptions,
nonce: nonce !== undefined ? Number(nonce) : undefined,
};
Expand All @@ -35,6 +37,7 @@ type SimulateContractParameters = {
account?: `0x${string}`;
gas?: bigint;
nonce?: number;
value?: bigint;
} & (
| { gasPrice?: bigint }
| { maxFeePerGas?: bigint }
Expand Down

0 comments on commit 23ae786

Please sign in to comment.