Skip to content

Commit

Permalink
feat: add save and save_if_fails to tx simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmolchany committed Aug 24, 2023
1 parent 7cdf08f commit 67e9a6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/executors/Simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ export class Simulator {
value: transaction.value,
data: transaction.input,
access_list: transaction.access_list,
save: transaction.save,
save_if_fails: transaction.save_if_fails,
})),
block_number_or_hash: {
blockNumber: blockNumber,
Expand All @@ -160,6 +162,8 @@ export class Simulator {
value: transaction.value,
data: transaction.input,
access_list: transaction.access_list,
save: transaction.save,
save_if_fails: transaction.save_if_fails,
},
block_number_or_hash: {
blockNumber: blockNumber,
Expand Down
4 changes: 4 additions & 0 deletions lib/executors/Simulator.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export type TransactionParameters = {
max_priority_fee_per_gas?: number;
value: string | number;
access_list?: AccessList;
save?: boolean;
save_if_fails?: boolean;
};

type AccessList = {
Expand Down Expand Up @@ -59,6 +61,8 @@ export type SimulationCallArguments = {
value: string | number;
data: string;
access_list?: AccessList;
save?: boolean;
save_if_fails?: boolean;
};

export type SimulationBundleDetails = {
Expand Down

0 comments on commit 67e9a6c

Please sign in to comment.