@cloakely/sdk 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -51,9 +51,11 @@ export function walletSubmitter(publicClient, wallet, router, batcher, migrator)
51
51
  if (call.kind === "placeOrder" && !batcher)
52
52
  throw new Error("no batcher configured");
53
53
  // Pad the estimate: state can change between estimation and inclusion (e.g. an order landing in a new batch round
54
- // writes fresh storage, ~60k more gas). Unused gas is refunded.
54
+ // writes fresh storage, ~60k more gas). Unused gas is refunded. Estimate from the address, not the local account:
55
+ // with a local account viem estimates twice, the second time capped at the first result, so a round turning over
56
+ // in between made that second estimate run out of gas.
55
57
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
- const est = await publicClient.estimateContractGas({ ...req, account: wallet.account });
58
+ const est = await publicClient.estimateContractGas({ ...req, account: wallet.account.address });
57
59
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
60
  const hash = await wallet.writeContract({ ...req, gas: (est * 13n) / 10n + 100000n });
59
61
  const r = await publicClient.waitForTransactionReceipt({ hash });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloakely/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Cloak on Elysium: sealed-bid token launches and private trading (shielded balances, private swaps, batch auctions, private sends) with on-device zero-knowledge proofs.",
5
5
  "keywords": [
6
6
  "cloak",