-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(common): move zero gas fee override to
createContract
(#1266)
- Loading branch information
Showing
5 changed files
with
47 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@latticexyz/common": minor | ||
--- | ||
|
||
- Moves zero gas fee override to `createContract` until https://github.com/wagmi-dev/viem/pull/963 or similar feature lands | ||
- Skip simulation if `gas` is provided |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
import { defineTransactionRequest } from "viem"; | ||
import { foundry } from "viem/chains"; | ||
import { MUDChain } from "./types"; | ||
|
||
export const mudFoundry = { | ||
...foundry, | ||
formatters: { | ||
transactionRequest: defineTransactionRequest({ | ||
format() { | ||
// Temporarily override base fee for MUD's anvil config | ||
// TODO: remove once https://github.com/wagmi-dev/viem/pull/963 is fixed | ||
return { | ||
maxFeePerGas: 0n, | ||
maxPriorityFeePerGas: 0n, | ||
}; | ||
}, | ||
}), | ||
}, | ||
}; | ||
// We may override chain settings here | ||
} as const satisfies MUDChain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters