Skip to content

Commit

Permalink
fix(ct): Update hard-coded Merkle leaf gas value on Moonbeam
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-goldman committed Mar 31, 2024
1 parent 8561ea4 commit e7ff758
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .changeset/friendly-rivers-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@sphinx-labs/contracts': patch
'@sphinx-labs/core': patch
'@sphinx-labs/plugins': patch
---

Update hard-coded Merkle leaf gas value on Moonbeam
8 changes: 5 additions & 3 deletions packages/contracts/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ export const calculateActionLeafGasForMoonbeam = (
access: ParsedAccountAccess
): string => {
// This is the maximum Merkle leaf gas size that fits in a batch on these networks. (The max batch
// size is 12M, and there's a buffer applied to 10,896,000 before we check whether it fits in a
// batch).
return (10_896_000).toString()
// size is 12M, and there's a buffer applied to the Merkle leaf's gas before we check whether it fits in a
// batch). It's possible to exceed the max batch size if the transaction's calldata is extremely large,
// but that's unlikely to happen. We were able to deploy a very large contract (Mean Finance's DCAHub)
// with this Merkle leaf gas value.
return (10_500_000).toString()
}

export type ExplorerName = 'Blockscout' | 'Etherscan'
Expand Down

0 comments on commit e7ff758

Please sign in to comment.