anchor-sdk 0.1.40 → 0.1.41-internal.0

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.
@@ -227,13 +227,23 @@ class AnchorERC1155Client {
227
227
  if (!this.walletClient || !this.account) {
228
228
  throw new Error("Wallet client and account are required to send transactions");
229
229
  }
230
+ const { maxFeePerGas, maxPriorityFeePerGas } = await this.publicClient.estimateFeesPerGas();
231
+ const gas = await this.publicClient.estimateGas({
232
+ to: contractAddress,
233
+ data: calldata,
234
+ value: 0n,
235
+ account: this.account,
236
+ });
230
237
  const txHash = await this.walletClient.writeContract({
231
238
  account: this.account,
232
239
  address: contractAddress,
233
240
  abi: AnchorERC1155_1.AnchorERC1155ABI,
234
241
  functionName: "multicall",
235
242
  args: [data],
236
- chain: null,
243
+ chain: this.publicClient.chain,
244
+ maxFeePerGas,
245
+ maxPriorityFeePerGas,
246
+ gas,
237
247
  });
238
248
  return await this.publicClient.waitForTransactionReceipt({ hash: txHash });
239
249
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anchor-sdk",
3
- "version": "0.1.40",
3
+ "version": "0.1.41-internal.0",
4
4
  "description": "TypeScript SDK for interacting with Anchor ecosystem - badge minting, payment processing, and ERC1155 token management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",