viem 2.0.0-alpha.20 → 2.0.0-alpha.21

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.
@@ -6,17 +6,13 @@ const getAction_js_1 = require("../../utils/getAction.js");
6
6
  const sendTransaction_js_1 = require("./sendTransaction.js");
7
7
  async function writeContract(client, parameters) {
8
8
  const { abi, address, args, dataSuffix, functionName, ...request } = parameters;
9
- const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
10
- abi,
11
- args,
12
- functionName,
13
- });
14
- const hash = await (0, getAction_js_1.getAction)(client, sendTransaction_js_1.sendTransaction)({
9
+ const data = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi, args, functionName });
10
+ const action = (0, getAction_js_1.getAction)(client, sendTransaction_js_1.sendTransaction);
11
+ return action({
15
12
  data: `${data}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,
16
13
  to: address,
17
14
  ...request,
18
15
  });
19
- return hash;
20
16
  }
21
17
  exports.writeContract = writeContract;
22
18
  //# sourceMappingURL=writeContract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":";;;AAgBA,iFAI8C;AAE9C,2DAAoD;AACpD,6DAK6B;AA6GtB,KAAK,UAAU,aAAa,CAQjC,MAAyC,EACzC,UAOC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAChE,UAAqC,CAAA;IACvC,MAAM,IAAI,GAAG,IAAA,0CAAkB,EAAC;QAC9B,GAAG;QACH,IAAI;QACJ,YAAY;KACmB,CAAC,CAAA;IAClC,MAAM,IAAI,GAAG,MAAM,IAAA,wBAAS,EAC1B,MAAM,EACN,oCAAe,CAChB,CAAC;QACA,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KACkB,CAAC,CAAA;IAC/B,OAAO,IAAI,CAAA;AACb,CAAC;AAlCD,sCAkCC"}
1
+ {"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":";;;AAgBA,iFAG8C;AAE9C,2DAAoD;AACpD,6DAI6B;AAyGtB,KAAK,UAAU,aAAa,CAQjC,MAAyC,EACzC,UAOC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAChE,UAAqC,CAAA;IACvC,MAAM,IAAI,GAAG,IAAA,0CAAkB,EAAC,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;IAC5D,MAAM,MAAM,GAAG,IAAA,wBAAS,EAAC,MAAM,EAAE,oCAAe,CAAC,CAAA;IACjD,OAAO,MAAM,CAAC;QACZ,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC;AA3BD,sCA2BC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '2.0.0-alpha.20';
4
+ exports.version = '2.0.0-alpha.21';
5
5
  //# sourceMappingURL=version.js.map
@@ -53,16 +53,12 @@ import { sendTransaction, } from './sendTransaction.js';
53
53
  */
54
54
  export async function writeContract(client, parameters) {
55
55
  const { abi, address, args, dataSuffix, functionName, ...request } = parameters;
56
- const data = encodeFunctionData({
57
- abi,
58
- args,
59
- functionName,
60
- });
61
- const hash = await getAction(client, sendTransaction)({
56
+ const data = encodeFunctionData({ abi, args, functionName });
57
+ const action = getAction(client, sendTransaction);
58
+ return action({
62
59
  data: `${data}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,
63
60
  to: address,
64
61
  ...request,
65
62
  });
66
- return hash;
67
63
  }
68
64
  //# sourceMappingURL=writeContract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":"AAgBA,OAAO,EAGL,kBAAkB,GACnB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAIL,eAAe,GAChB,MAAM,sBAAsB,CAAA;AA2D7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAQjC,MAAyC,EACzC,UAOC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAChE,UAAqC,CAAA;IACvC,MAAM,IAAI,GAAG,kBAAkB,CAAC;QAC9B,GAAG;QACH,IAAI;QACJ,YAAY;KACmB,CAAC,CAAA;IAClC,MAAM,IAAI,GAAG,MAAM,SAAS,CAC1B,MAAM,EACN,eAAe,CAChB,CAAC;QACA,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KACkB,CAAC,CAAA;IAC/B,OAAO,IAAI,CAAA;AACb,CAAC"}
1
+ {"version":3,"file":"writeContract.js","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,kBAAkB,GACnB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,EAGL,eAAe,GAChB,MAAM,sBAAsB,CAAA;AAuD7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAQjC,MAAyC,EACzC,UAOC;IAED,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,OAAO,EAAE,GAChE,UAAqC,CAAA;IACvC,MAAM,IAAI,GAAG,kBAAkB,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAA;IAC5D,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACjD,OAAO,MAAM,CAAC;QACZ,IAAI,EAAE,GAAG,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAChE,EAAE,EAAE,OAAO;QACX,GAAG,OAAO;KACX,CAAC,CAAA;AACJ,CAAC"}
@@ -1,2 +1,2 @@
1
- export const version = '2.0.0-alpha.20';
1
+ export const version = '2.0.0-alpha.21';
2
2
  //# sourceMappingURL=version.js.map
@@ -10,8 +10,8 @@ import type { Hex } from '../../types/misc.js';
10
10
  import type { Prettify, UnionEvaluate, UnionOmit } from '../../types/utils.js';
11
11
  import { type EncodeFunctionDataErrorType } from '../../utils/abi/encodeFunctionData.js';
12
12
  import type { FormattedTransactionRequest } from '../../utils/formatters/transactionRequest.js';
13
- import { type SendTransactionErrorType, type SendTransactionParameters, type SendTransactionReturnType } from './sendTransaction.js';
14
- export type WriteContractParameters<abi extends Abi | readonly unknown[] = Abi, functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'> = ContractFunctionName<abi, 'nonpayable' | 'payable'>, args extends ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>, chain extends Chain | undefined = Chain, account extends Account | undefined = Account | undefined, chainOverride extends Chain | undefined = Chain | undefined, allFunctionNames = ContractFunctionName<abi, 'nonpayable' | 'payable'>> = ContractFunctionParameters<abi, 'nonpayable' | 'payable', functionName, args, allFunctionNames> & Prettify<GetAccountParameter<account> & GetChain<chain, chainOverride> & GetValue<abi, functionName, SendTransactionParameters<chain, account, chainOverride> extends SendTransactionParameters ? SendTransactionParameters<chain, account, chainOverride>['value'] : SendTransactionParameters['value']> & {
13
+ import { type SendTransactionErrorType, type SendTransactionReturnType } from './sendTransaction.js';
14
+ export type WriteContractParameters<abi extends Abi | readonly unknown[] = Abi, functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'> = ContractFunctionName<abi, 'nonpayable' | 'payable'>, args extends ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>, chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined, chainOverride extends Chain | undefined = Chain | undefined, allFunctionNames = ContractFunctionName<abi, 'nonpayable' | 'payable'>> = ContractFunctionParameters<abi, 'nonpayable' | 'payable', functionName, args, allFunctionNames> & GetChain<chain, chainOverride> & Prettify<GetAccountParameter<account> & GetValue<abi, functionName, FormattedTransactionRequest<chainOverride extends Chain ? chainOverride : chain>['value']> & {
15
15
  /** Data to append to the end of the calldata. Useful for adding a ["domain" tag](https://opensea.notion.site/opensea/Seaport-Order-Attributions-ec2d69bf455041a5baa490941aad307f). */
16
16
  dataSuffix?: Hex;
17
17
  }> & UnionEvaluate<UnionOmit<FormattedTransactionRequest<chainOverride extends Chain ? chainOverride : chain>, 'data' | 'from' | 'to' | 'value'>>;
@@ -1 +1 @@
1
- {"version":3,"file":"writeContract.d.ts","sourceRoot":"","sources":["../../../actions/wallet/writeContract.ts"],"names":[],"mappings":"AAAA,OAA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,uBAAuB,GAAG,yBAAyB,CAAA;AAE/D,MAAM,MAAM,sBAAsB,GAC9B,2BAA2B,GAC3B,wBAAwB,GACxB,SAAS,CAAA;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAsB,aAAa,CACjC,KAAK,SAAS,KAAK,GAAG,SAAS,EAC/B,OAAO,SAAS,OAAO,GAAG,SAAS,EACnC,KAAK,CAAC,GAAG,SAAS,GAAG,GAAG,SAAS,OAAO,EAAE,EAC1C,YAAY,SAAS,oBAAoB,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,CAAC,EACxE,IAAI,SAAS,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,YAAY,CAAC,EACrE,aAAa,SAAS,KAAK,GAAG,SAAS,EAEvC,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACzC,UAAU,EAAE,uBAAuB,CACjC,GAAG,EACH,YAAY,EACZ,IAAI,EACJ,KAAK,EACL,OAAO,EACP,aAAa,CACd,GACA,OAAO,CAAC,uBAAuB,CAAC,CAUlC"}
@@ -1,2 +1,2 @@
1
- export declare const version = "2.0.0-alpha.20";
1
+ export declare const version = "2.0.0-alpha.21";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -156,7 +156,7 @@ export type ExtractChainFormatterReturnType<chain extends {
156
156
  export type GetChain<chain extends Chain | undefined, chainOverride extends Chain | undefined = undefined> = IsUndefined<chain> extends true ? {
157
157
  chain: chainOverride | null;
158
158
  } : {
159
- chain?: chainOverride | null;
159
+ chain?: chainOverride | null | undefined;
160
160
  };
161
161
  export {};
162
162
  //# sourceMappingURL=chain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chain.d.ts","sourceRoot":"","sources":["../../types/chain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK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AG,SAAS,IACjD,WAAW,CAAC,KAAK,CAAC,SAAS,IAAI,GAC/B;IAAE,KAAK,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GAC/B;IAAE,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,CAAA"}
@@ -16,14 +16,12 @@ import type { Hex } from '../../types/misc.js'
16
16
  import type { Prettify, UnionEvaluate, UnionOmit } from '../../types/utils.js'
17
17
  import {
18
18
  type EncodeFunctionDataErrorType,
19
- type EncodeFunctionDataParameters,
20
19
  encodeFunctionData,
21
20
  } from '../../utils/abi/encodeFunctionData.js'
22
21
  import type { FormattedTransactionRequest } from '../../utils/formatters/transactionRequest.js'
23
22
  import { getAction } from '../../utils/getAction.js'
24
23
  import {
25
24
  type SendTransactionErrorType,
26
- type SendTransactionParameters,
27
25
  type SendTransactionReturnType,
28
26
  sendTransaction,
29
27
  } from './sendTransaction.js'
@@ -39,7 +37,7 @@ export type WriteContractParameters<
39
37
  'nonpayable' | 'payable',
40
38
  functionName
41
39
  > = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>,
42
- chain extends Chain | undefined = Chain,
40
+ chain extends Chain | undefined = Chain | undefined,
43
41
  account extends Account | undefined = Account | undefined,
44
42
  chainOverride extends Chain | undefined = Chain | undefined,
45
43
  ///
@@ -51,19 +49,15 @@ export type WriteContractParameters<
51
49
  args,
52
50
  allFunctionNames
53
51
  > &
52
+ GetChain<chain, chainOverride> &
54
53
  Prettify<
55
54
  GetAccountParameter<account> &
56
- GetChain<chain, chainOverride> &
57
55
  GetValue<
58
56
  abi,
59
57
  functionName,
60
- SendTransactionParameters<
61
- chain,
62
- account,
63
- chainOverride
64
- > extends SendTransactionParameters
65
- ? SendTransactionParameters<chain, account, chainOverride>['value']
66
- : SendTransactionParameters['value']
58
+ FormattedTransactionRequest<
59
+ chainOverride extends Chain ? chainOverride : chain
60
+ >['value']
67
61
  > & {
68
62
  /** Data to append to the end of the calldata. Useful for adding a ["domain" tag](https://opensea.notion.site/opensea/Seaport-Order-Attributions-ec2d69bf455041a5baa490941aad307f). */
69
63
  dataSuffix?: Hex
@@ -155,18 +149,11 @@ export async function writeContract<
155
149
  ): Promise<WriteContractReturnType> {
156
150
  const { abi, address, args, dataSuffix, functionName, ...request } =
157
151
  parameters as WriteContractParameters
158
- const data = encodeFunctionData({
159
- abi,
160
- args,
161
- functionName,
162
- } as EncodeFunctionDataParameters)
163
- const hash = await getAction(
164
- client,
165
- sendTransaction,
166
- )({
152
+ const data = encodeFunctionData({ abi, args, functionName })
153
+ const action = getAction(client, sendTransaction)
154
+ return action({
167
155
  data: `${data}${dataSuffix ? dataSuffix.replace('0x', '') : ''}`,
168
156
  to: address,
169
157
  ...request,
170
- } as SendTransactionParameters)
171
- return hash
158
+ })
172
159
  }
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.0.0-alpha.20'
1
+ export const version = '2.0.0-alpha.21'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.0.0-alpha.20",
4
+ "version": "2.0.0-alpha.21",
5
5
  "main": "./_cjs/index.js",
6
6
  "module": "./_esm/index.js",
7
7
  "types": "./_types/index.d.ts",
package/types/chain.ts CHANGED
@@ -239,4 +239,4 @@ export type GetChain<
239
239
  chainOverride extends Chain | undefined = undefined,
240
240
  > = IsUndefined<chain> extends true
241
241
  ? { chain: chainOverride | null }
242
- : { chain?: chainOverride | null }
242
+ : { chain?: chainOverride | null | undefined }