@polymarket/relayer-client 1.0.15 → 1.0.16
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/signeradapter/adapter.js +16 -13
- package/package.json +2 -2
|
@@ -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
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
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
|
-
|
|
161
|
+
gas = gasLimit;
|
|
168
162
|
}
|
|
169
163
|
if (overrides.gasPrice != undefined) {
|
|
170
164
|
let gasPrice = ethers_1.ethers.BigNumber.from(overrides.gasPrice).toBigInt();
|
|
171
|
-
|
|
165
|
+
gasPrice = gasPrice;
|
|
172
166
|
}
|
|
173
|
-
const txnHash = yield this.viemSigner.walletClient.writeContract(
|
|
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.
|
|
4
|
+
"version": "1.0.16",
|
|
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": "
|
|
18
|
+
"viem": "1.9.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/chai": "^4.3.3",
|