@polymarket/relayer-client 1.0.15 → 1.0.17

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.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./client";
2
2
  export * from "./types";
3
3
  export * from "./signeradapter";
4
+ export * from "./response";
package/dist/index.js CHANGED
@@ -4,3 +4,4 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./client"), exports);
5
5
  tslib_1.__exportStar(require("./types"), exports);
6
6
  tslib_1.__exportStar(require("./signeradapter"), exports);
7
+ tslib_1.__exportStar(require("./response"), exports);
@@ -152,25 +152,28 @@ class SignerAdapter {
152
152
  throw new Error("viem signer must be defined");
153
153
  }
154
154
  let addr = address;
155
- const chain = (_a = this.viemSigner) === null || _a === void 0 ? void 0 : _a.publicClient.chain;
156
- const account = (_c = (_b = this.viemSigner) === null || _b === void 0 ? void 0 : _b.walletClient.account) === null || _c === void 0 ? void 0 : _c.address;
157
- const writeArgs = {
158
- account: account,
159
- chain: chain,
160
- address: addr,
161
- abi: abi,
162
- functionName: functionName,
163
- args: args,
164
- };
155
+ const account = (_b = (_a = this.viemSigner) === null || _a === void 0 ? void 0 : _a.walletClient.account) === null || _b === void 0 ? void 0 : _b.address;
156
+ const chain = (_c = this.viemSigner) === null || _c === void 0 ? void 0 : _c.publicClient.chain;
157
+ let gas = undefined;
158
+ let gasPrice = undefined;
165
159
  if (overrides.gasLimit != undefined) {
166
160
  let gasLimit = ethers_1.ethers.BigNumber.from(overrides.gasLimit).toBigInt();
167
- writeArgs.gas = gasLimit;
161
+ gas = gasLimit;
168
162
  }
169
163
  if (overrides.gasPrice != undefined) {
170
164
  let gasPrice = ethers_1.ethers.BigNumber.from(overrides.gasPrice).toBigInt();
171
- writeArgs.gasPrice = gasPrice;
165
+ gasPrice = gasPrice;
172
166
  }
173
- const txnHash = yield this.viemSigner.walletClient.writeContract(writeArgs);
167
+ const txnHash = yield this.viemSigner.walletClient.writeContract({
168
+ account: account,
169
+ address: addr,
170
+ abi: abi,
171
+ functionName: functionName,
172
+ args: args,
173
+ gas,
174
+ gasPrice,
175
+ chain,
176
+ });
174
177
  return new response_1.ViemTransactionResponse(txnHash, this.viemSigner.publicClient);
175
178
  });
176
179
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@polymarket/relayer-client",
3
3
  "description": "Client for Polymarket relayers",
4
- "version": "1.0.15",
4
+ "version": "1.0.17",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
@@ -15,7 +15,7 @@
15
15
  "axios": "^0.27.2",
16
16
  "browser-or-node": "^3.0.0",
17
17
  "ethers": "^5.7.1",
18
- "viem": "^2.21.16"
18
+ "viem": "1.9.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/chai": "^4.3.3",