viem 2.0.0-rc.4 → 2.0.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/_cjs/actions/getContract.js +6 -6
  3. package/_cjs/actions/getContract.js.map +1 -1
  4. package/_cjs/chains/definitions/defichainEvm.js +39 -0
  5. package/_cjs/chains/definitions/defichainEvm.js.map +1 -0
  6. package/_cjs/chains/definitions/defichainEvmTestnet.js +40 -0
  7. package/_cjs/chains/definitions/defichainEvmTestnet.js.map +1 -0
  8. package/_cjs/chains/index.js +8 -4
  9. package/_cjs/chains/index.js.map +1 -1
  10. package/_cjs/errors/version.js +1 -1
  11. package/_cjs/errors/version.js.map +1 -1
  12. package/_esm/actions/getContract.js +6 -6
  13. package/_esm/actions/getContract.js.map +1 -1
  14. package/_esm/chains/definitions/defichainEvm.js +36 -0
  15. package/_esm/chains/definitions/defichainEvm.js.map +1 -0
  16. package/_esm/chains/definitions/defichainEvmTestnet.js +37 -0
  17. package/_esm/chains/definitions/defichainEvmTestnet.js.map +1 -0
  18. package/_esm/chains/index.js +2 -0
  19. package/_esm/chains/index.js.map +1 -1
  20. package/_esm/errors/version.js +1 -1
  21. package/_esm/errors/version.js.map +1 -1
  22. package/_types/actions/getContract.d.ts +12 -9
  23. package/_types/actions/getContract.d.ts.map +1 -1
  24. package/_types/chains/definitions/defichainEvm.d.ts +40 -0
  25. package/_types/chains/definitions/defichainEvm.d.ts.map +1 -0
  26. package/_types/chains/definitions/defichainEvmTestnet.d.ts +40 -0
  27. package/_types/chains/definitions/defichainEvmTestnet.d.ts.map +1 -0
  28. package/_types/chains/index.d.ts +2 -0
  29. package/_types/chains/index.d.ts.map +1 -1
  30. package/_types/errors/version.d.ts +1 -1
  31. package/_types/errors/version.d.ts.map +1 -1
  32. package/actions/getContract.ts +24 -24
  33. package/chains/definitions/defichainEvm.ts +36 -0
  34. package/chains/definitions/defichainEvmTestnet.ts +37 -0
  35. package/chains/index.ts +2 -0
  36. package/errors/version.ts +1 -1
  37. package/package.json +34 -12
  38. package/_cjs/_test/generated.js +0 -313
  39. package/_cjs/_test/generated.js.map +0 -1
  40. package/_esm/_test/generated.js +0 -335
  41. package/_esm/_test/generated.js.map +0 -1
  42. package/_test/generated.ts +0 -350
  43. package/_types/_test/generated.d.ts +0 -428
  44. package/_types/_test/generated.d.ts.map +0 -1
@@ -0,0 +1,40 @@
1
+ export declare const defichainEvmTestnet: {
2
+ blockExplorers: {
3
+ readonly default: {
4
+ readonly name: "DeFiScan";
5
+ readonly url: "https://meta.defiscan.live/?network=TestNet";
6
+ };
7
+ readonly blockscout: {
8
+ readonly name: "Blockscout";
9
+ readonly url: "https://blockscout.testnet.ocean.jellyfishsdk.com";
10
+ };
11
+ };
12
+ contracts: {
13
+ readonly multicall3: {
14
+ readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
15
+ readonly blockCreated: 156462;
16
+ };
17
+ };
18
+ id: 1131;
19
+ name: "DeFiChain EVM Testnet";
20
+ nativeCurrency: {
21
+ readonly name: "DeFiChain";
22
+ readonly symbol: "DFI";
23
+ readonly decimals: 8;
24
+ };
25
+ rpcUrls: {
26
+ readonly default: {
27
+ readonly http: readonly ["https://eth.testnet.ocean.jellyfishsdk.com"];
28
+ };
29
+ readonly public: {
30
+ readonly http: readonly ["https://eth.testnet.ocean.jellyfishsdk.com"];
31
+ };
32
+ };
33
+ sourceId?: number | undefined;
34
+ testnet: true;
35
+ formatters?: undefined;
36
+ serializers?: import("../../index.js").ChainSerializers<undefined> | undefined;
37
+ fees?: import("../../index.js").ChainFees<undefined> | undefined;
38
+ readonly network: "defichain-evm-testnet";
39
+ };
40
+ //# sourceMappingURL=defichainEvmTestnet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defichainEvmTestnet.d.ts","sourceRoot":"","sources":["../../../chains/definitions/defichainEvmTestnet.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC9B,CAAA"}
@@ -37,6 +37,8 @@ export { coreDao } from './definitions/coreDao.js';
37
37
  export { cronos } from './definitions/cronos.js';
38
38
  export { cronosTestnet } from './definitions/cronosTestnet.js';
39
39
  export { crossbell } from './definitions/crossbell.js';
40
+ export { defichainEvm } from './definitions/defichainEvm.js';
41
+ export { defichainEvmTestnet } from './definitions/defichainEvmTestnet.js';
40
42
  export { dfk } from './definitions/dfk.js';
41
43
  export { dogechain } from './definitions/dogechain.js';
42
44
  export { edgeware } from './definitions/edgeware.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../chains/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;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Aa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAA;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAA;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAK1D,YAAY,EACV,MAAM,EACN,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,cAAc,GACf,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,wBAAwB,GACzB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,qCAAqC,EACrC,kBAAkB,EAClB,yBAAyB,EACzB,kCAAkC,EAClC,8BAA8B,EAC9B,4BAA4B,EAC5B,sBAAsB,EACtB,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,gCAAgC,CAAA"}
@@ -1,2 +1,2 @@
1
- export declare const version = "2.0.0-rc.4";
1
+ export declare const version = "2.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../errors/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,eAAe,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../errors/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
@@ -72,10 +72,15 @@ type KeyedClient<
72
72
  TTransport extends Transport = Transport,
73
73
  TChain extends Chain | undefined = Chain | undefined,
74
74
  TAccount extends Account | undefined = Account | undefined,
75
- > = {
76
- publicClient: Client<TTransport, TChain>
77
- walletClient: Client<TTransport, TChain, TAccount>
78
- }
75
+ > =
76
+ | {
77
+ public?: Client<TTransport, TChain>
78
+ wallet: Client<TTransport, TChain, TAccount>
79
+ }
80
+ | {
81
+ public: Client<TTransport, TChain>
82
+ wallet?: Client<TTransport, TChain, TAccount>
83
+ }
79
84
 
80
85
  export type GetContractParameters<
81
86
  TTransport extends Transport = Transport,
@@ -84,8 +89,9 @@ export type GetContractParameters<
84
89
  TAbi extends Abi | readonly unknown[] = Abi,
85
90
  TClient extends
86
91
  | Client<TTransport, TChain, TAccount>
87
- | KeyedClient<TTransport, TChain, TAccount>
88
- | unknown = unknown,
92
+ | KeyedClient<TTransport, TChain, TAccount> =
93
+ | Client<TTransport, TChain, TAccount>
94
+ | KeyedClient<TTransport, TChain, TAccount>,
89
95
  TAddress extends Address = Address,
90
96
  > = {
91
97
  /** Contract ABI */
@@ -113,7 +119,7 @@ export type GetContractParameters<
113
119
 
114
120
  export type GetContractReturnType<
115
121
  TAbi extends Abi | readonly unknown[] = Abi,
116
- TClient extends Client | KeyedClient | unknown = unknown,
122
+ TClient extends Client | KeyedClient = Client | KeyedClient,
117
123
  TAddress extends Address = Address,
118
124
  _EventNames extends string = TAbi extends Abi
119
125
  ? Abi extends TAbi
@@ -132,14 +138,14 @@ export type GetContractReturnType<
132
138
  : string,
133
139
  _Narrowable extends boolean = IsNarrowable<TAbi, Abi>,
134
140
  _PublicClient extends Client | unknown = TClient extends {
135
- publicClient: Client
141
+ public: Client
136
142
  }
137
- ? TClient['publicClient']
143
+ ? TClient['public']
138
144
  : TClient,
139
145
  _WalletClient extends Client | unknown = TClient extends {
140
- walletClient: Client
146
+ wallet: Client
141
147
  }
142
- ? TClient['walletClient']
148
+ ? TClient['wallet']
143
149
  : TClient,
144
150
  > = Prettify<
145
151
  Prettify<
@@ -471,15 +477,11 @@ export function getContract<
471
477
  TTransport extends Transport,
472
478
  TAddress extends Address,
473
479
  const TAbi extends Abi | readonly unknown[],
474
- TChain extends Chain | undefined = Chain | undefined,
475
- TAccount extends Account | undefined = Account | undefined,
476
480
  const TClient extends
477
481
  | Client<TTransport, TChain, TAccount>
478
- | KeyedClient<TTransport, TChain, TAccount>
479
- | unknown =
480
- | Client<TTransport, TChain, TAccount>
481
- | KeyedClient<TTransport, TChain, TAccount>
482
- | unknown,
482
+ | KeyedClient<TTransport, TChain, TAccount>,
483
+ TChain extends Chain | undefined = Chain | undefined,
484
+ TAccount extends Account | undefined = Account | undefined,
483
485
  >({
484
486
  abi,
485
487
  address,
@@ -498,12 +500,10 @@ export function getContract<
498
500
 
499
501
  const [publicClient, walletClient] = (() => {
500
502
  if (!client) return [undefined, undefined]
501
- if ('publicClient' in client && 'walletClient' in client)
502
- return [client.publicClient as Client, client.walletClient as Client]
503
- if ('publicClient' in client)
504
- return [client.publicClient as Client, undefined]
505
- if ('walletClient' in client)
506
- return [undefined, client.walletClient as Client]
503
+ if ('public' in client && 'wallet' in client)
504
+ return [client.public as Client, client.wallet as Client]
505
+ if ('public' in client) return [client.public as Client, undefined]
506
+ if ('wallet' in client) return [undefined, client.wallet as Client]
507
507
  return [client, client]
508
508
  })()
509
509
 
@@ -0,0 +1,36 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const defichainEvm = /*#__PURE__*/ defineChain({
4
+ id: 1130,
5
+ network: 'defichain-evm',
6
+ name: 'DeFiChain EVM Mainnet',
7
+ nativeCurrency: {
8
+ name: 'DeFiChain',
9
+ symbol: 'DFI',
10
+ decimals: 8,
11
+ },
12
+ rpcUrls: {
13
+ default: {
14
+ http: ['https://eth.mainnet.ocean.jellyfishsdk.com'],
15
+ },
16
+ public: {
17
+ http: ['https://eth.mainnet.ocean.jellyfishsdk.com'],
18
+ },
19
+ },
20
+ blockExplorers: {
21
+ default: {
22
+ name: 'DeFiScan',
23
+ url: 'https://meta.defiscan.live',
24
+ },
25
+ blockscout: {
26
+ name: 'Blockscout',
27
+ url: 'https://blockscout.mainnet.ocean.jellyfishsdk.com',
28
+ },
29
+ },
30
+ contracts: {
31
+ multicall3: {
32
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
33
+ blockCreated: 137852,
34
+ },
35
+ },
36
+ })
@@ -0,0 +1,37 @@
1
+ import { defineChain } from '../../utils/chain/defineChain.js'
2
+
3
+ export const defichainEvmTestnet = /*#__PURE__*/ defineChain({
4
+ id: 1131,
5
+ network: 'defichain-evm-testnet',
6
+ name: 'DeFiChain EVM Testnet',
7
+ nativeCurrency: {
8
+ name: 'DeFiChain',
9
+ symbol: 'DFI',
10
+ decimals: 8,
11
+ },
12
+ rpcUrls: {
13
+ default: {
14
+ http: ['https://eth.testnet.ocean.jellyfishsdk.com'],
15
+ },
16
+ public: {
17
+ http: ['https://eth.testnet.ocean.jellyfishsdk.com'],
18
+ },
19
+ },
20
+ blockExplorers: {
21
+ default: {
22
+ name: 'DeFiScan',
23
+ url: 'https://meta.defiscan.live/?network=TestNet',
24
+ },
25
+ blockscout: {
26
+ name: 'Blockscout',
27
+ url: 'https://blockscout.testnet.ocean.jellyfishsdk.com',
28
+ },
29
+ },
30
+ contracts: {
31
+ multicall3: {
32
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
33
+ blockCreated: 156462,
34
+ },
35
+ },
36
+ testnet: true,
37
+ })
package/chains/index.ts CHANGED
@@ -38,6 +38,8 @@ export { coreDao } from './definitions/coreDao.js'
38
38
  export { cronos } from './definitions/cronos.js'
39
39
  export { cronosTestnet } from './definitions/cronosTestnet.js'
40
40
  export { crossbell } from './definitions/crossbell.js'
41
+ export { defichainEvm } from './definitions/defichainEvm.js'
42
+ export { defichainEvmTestnet } from './definitions/defichainEvmTestnet.js'
41
43
  export { dfk } from './definitions/dfk.js'
42
44
  export { dogechain } from './definitions/dogechain.js'
43
45
  export { edgeware } from './definitions/edgeware.js'
package/errors/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = '2.0.0-rc.4'
1
+ export const version = '2.0.0'
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "viem",
3
3
  "description": "TypeScript Interface for Ethereum",
4
- "version": "2.0.0-rc.4",
5
- "type": "module",
4
+ "version": "2.0.0",
6
5
  "main": "./_cjs/index.js",
7
6
  "module": "./_esm/index.js",
8
7
  "types": "./_types/index.d.ts",
@@ -77,13 +76,27 @@
77
76
  },
78
77
  "typesVersions": {
79
78
  "*": {
80
- "accounts": ["./_types/accounts/index.d.ts"],
81
- "actions": ["./_types/actions/index.d.ts"],
82
- "chains": ["./_types/chains/index.d.ts"],
83
- "chains/utils": ["./_types/chains/utils.d.ts"],
84
- "ens": ["./_types/ens/index.d.ts"],
85
- "utils": ["./_types/utils/index.d.ts"],
86
- "window": ["./_types/window/index.d.ts"]
79
+ "accounts": [
80
+ "./_types/accounts/index.d.ts"
81
+ ],
82
+ "actions": [
83
+ "./_types/actions/index.d.ts"
84
+ ],
85
+ "chains": [
86
+ "./_types/chains/index.d.ts"
87
+ ],
88
+ "chains/utils": [
89
+ "./_types/chains/utils.d.ts"
90
+ ],
91
+ "ens": [
92
+ "./_types/ens/index.d.ts"
93
+ ],
94
+ "utils": [
95
+ "./_types/utils/index.d.ts"
96
+ ],
97
+ "window": [
98
+ "./_types/window/index.d.ts"
99
+ ]
87
100
  }
88
101
  },
89
102
  "peerDependencies": {
@@ -107,12 +120,21 @@
107
120
  "license": "MIT",
108
121
  "homepage": "https://viem.sh",
109
122
  "repository": "wevm/viem",
110
- "authors": ["awkweb.eth", "jxom.eth"],
123
+ "authors": [
124
+ "awkweb.eth",
125
+ "jxom.eth"
126
+ ],
111
127
  "funding": [
112
128
  {
113
129
  "type": "github",
114
130
  "url": "https://github.com/sponsors/wevm"
115
131
  }
116
132
  ],
117
- "keywords": ["eth", "ethereum", "dapps", "wallet", "web3"]
118
- }
133
+ "keywords": [
134
+ "eth",
135
+ "ethereum",
136
+ "dapps",
137
+ "wallet",
138
+ "web3"
139
+ ]
140
+ }
@@ -1,313 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.payableABI = exports.offchainLookupExampleABI = exports.errorsExampleABI = exports.ensAvatarTokenUriABI = exports.gh434ABI = exports.erc20InvalidTransferEventABI = exports.verifySigABI = exports.ierc1271WalletABI = void 0;
4
- exports.ierc1271WalletABI = [
5
- {
6
- stateMutability: 'view',
7
- type: 'function',
8
- inputs: [
9
- { name: 'hash', internalType: 'bytes32', type: 'bytes32' },
10
- { name: 'signature', internalType: 'bytes', type: 'bytes' },
11
- ],
12
- name: 'isValidSignature',
13
- outputs: [{ name: 'magicValue', internalType: 'bytes4', type: 'bytes4' }],
14
- },
15
- ];
16
- exports.verifySigABI = [
17
- {
18
- stateMutability: 'nonpayable',
19
- type: 'constructor',
20
- inputs: [
21
- { name: '_signer', internalType: 'address', type: 'address' },
22
- { name: '_hash', internalType: 'bytes32', type: 'bytes32' },
23
- { name: '_signature', internalType: 'bytes', type: 'bytes' },
24
- ],
25
- },
26
- {
27
- stateMutability: 'nonpayable',
28
- type: 'function',
29
- inputs: [
30
- { name: '_signer', internalType: 'address', type: 'address' },
31
- { name: '_hash', internalType: 'bytes32', type: 'bytes32' },
32
- { name: '_signature', internalType: 'bytes', type: 'bytes' },
33
- ],
34
- name: 'isValidUniversalSig',
35
- outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
36
- },
37
- ];
38
- exports.erc20InvalidTransferEventABI = [
39
- {
40
- type: 'event',
41
- anonymous: false,
42
- inputs: [
43
- { name: 'from', internalType: 'address', type: 'address', indexed: true },
44
- { name: 'to', internalType: 'address', type: 'address', indexed: false },
45
- {
46
- name: 'value',
47
- internalType: 'uint256',
48
- type: 'uint256',
49
- indexed: false,
50
- },
51
- ],
52
- name: 'Transfer',
53
- },
54
- {
55
- stateMutability: 'nonpayable',
56
- type: 'function',
57
- inputs: [
58
- { name: 'recipient', internalType: 'address', type: 'address' },
59
- { name: 'amount', internalType: 'uint256', type: 'uint256' },
60
- ],
61
- name: 'transfer',
62
- outputs: [],
63
- },
64
- ];
65
- exports.gh434ABI = [
66
- {
67
- stateMutability: 'pure',
68
- type: 'function',
69
- inputs: [],
70
- name: 'bar',
71
- outputs: [{ name: '', internalType: 'string', type: 'string' }],
72
- },
73
- {
74
- stateMutability: 'pure',
75
- type: 'function',
76
- inputs: [],
77
- name: 'baz',
78
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
79
- },
80
- {
81
- stateMutability: 'pure',
82
- type: 'function',
83
- inputs: [],
84
- name: 'foo',
85
- outputs: [
86
- { name: 'a', internalType: 'uint256', type: 'uint256' },
87
- { name: 'b', internalType: 'bool', type: 'bool' },
88
- ],
89
- },
90
- ];
91
- exports.ensAvatarTokenUriABI = [
92
- {
93
- stateMutability: 'view',
94
- type: 'function',
95
- inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }],
96
- name: 'ownerOf',
97
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
98
- },
99
- {
100
- stateMutability: 'view',
101
- type: 'function',
102
- inputs: [{ name: 'tokenId', internalType: 'uint256', type: 'uint256' }],
103
- name: 'tokenURI',
104
- outputs: [{ name: '', internalType: 'string', type: 'string' }],
105
- },
106
- ];
107
- exports.errorsExampleABI = [
108
- {
109
- type: 'error',
110
- inputs: [
111
- {
112
- name: 'foo',
113
- internalType: 'struct ErrorsExample.Foo',
114
- type: 'tuple',
115
- components: [
116
- { name: 'sender', internalType: 'address', type: 'address' },
117
- { name: 'bar', internalType: 'uint256', type: 'uint256' },
118
- ],
119
- },
120
- { name: 'message', internalType: 'string', type: 'string' },
121
- { name: 'number', internalType: 'uint256', type: 'uint256' },
122
- ],
123
- name: 'ComplexError',
124
- },
125
- {
126
- type: 'error',
127
- inputs: [{ name: 'message', internalType: 'string', type: 'string' }],
128
- name: 'SimpleError',
129
- },
130
- { type: 'error', inputs: [], name: 'SimpleErrorNoArgs' },
131
- {
132
- stateMutability: 'pure',
133
- type: 'function',
134
- inputs: [],
135
- name: 'assertRead',
136
- outputs: [],
137
- },
138
- {
139
- stateMutability: 'nonpayable',
140
- type: 'function',
141
- inputs: [],
142
- name: 'assertWrite',
143
- outputs: [],
144
- },
145
- {
146
- stateMutability: 'pure',
147
- type: 'function',
148
- inputs: [],
149
- name: 'complexCustomRead',
150
- outputs: [],
151
- },
152
- {
153
- stateMutability: 'nonpayable',
154
- type: 'function',
155
- inputs: [],
156
- name: 'complexCustomWrite',
157
- outputs: [],
158
- },
159
- {
160
- stateMutability: 'pure',
161
- type: 'function',
162
- inputs: [],
163
- name: 'divideByZeroRead',
164
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
165
- },
166
- {
167
- stateMutability: 'nonpayable',
168
- type: 'function',
169
- inputs: [],
170
- name: 'divideByZeroWrite',
171
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
172
- },
173
- {
174
- stateMutability: 'pure',
175
- type: 'function',
176
- inputs: [],
177
- name: 'overflowRead',
178
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
179
- },
180
- {
181
- stateMutability: 'nonpayable',
182
- type: 'function',
183
- inputs: [],
184
- name: 'overflowWrite',
185
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
186
- },
187
- {
188
- stateMutability: 'pure',
189
- type: 'function',
190
- inputs: [],
191
- name: 'requireRead',
192
- outputs: [],
193
- },
194
- {
195
- stateMutability: 'nonpayable',
196
- type: 'function',
197
- inputs: [],
198
- name: 'requireWrite',
199
- outputs: [],
200
- },
201
- {
202
- stateMutability: 'pure',
203
- type: 'function',
204
- inputs: [],
205
- name: 'revertRead',
206
- outputs: [],
207
- },
208
- {
209
- stateMutability: 'nonpayable',
210
- type: 'function',
211
- inputs: [],
212
- name: 'revertWrite',
213
- outputs: [],
214
- },
215
- {
216
- stateMutability: 'pure',
217
- type: 'function',
218
- inputs: [],
219
- name: 'simpleCustomRead',
220
- outputs: [],
221
- },
222
- {
223
- stateMutability: 'pure',
224
- type: 'function',
225
- inputs: [],
226
- name: 'simpleCustomReadNoArgs',
227
- outputs: [],
228
- },
229
- {
230
- stateMutability: 'nonpayable',
231
- type: 'function',
232
- inputs: [],
233
- name: 'simpleCustomWrite',
234
- outputs: [],
235
- },
236
- ];
237
- exports.offchainLookupExampleABI = [
238
- {
239
- stateMutability: 'nonpayable',
240
- type: 'constructor',
241
- inputs: [{ name: 'urls_', internalType: 'string[]', type: 'string[]' }],
242
- },
243
- {
244
- type: 'error',
245
- inputs: [
246
- { name: 'sender', internalType: 'address', type: 'address' },
247
- { name: 'urls', internalType: 'string[]', type: 'string[]' },
248
- { name: 'callData', internalType: 'bytes', type: 'bytes' },
249
- { name: 'callbackFunction', internalType: 'bytes4', type: 'bytes4' },
250
- { name: 'extraData', internalType: 'bytes', type: 'bytes' },
251
- ],
252
- name: 'OffchainLookup',
253
- },
254
- {
255
- stateMutability: 'view',
256
- type: 'function',
257
- inputs: [{ name: 'name', internalType: 'string', type: 'string' }],
258
- name: 'getAddress',
259
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
260
- },
261
- {
262
- stateMutability: 'view',
263
- type: 'function',
264
- inputs: [
265
- { name: 'result', internalType: 'bytes', type: 'bytes' },
266
- { name: 'extraData', internalType: 'bytes', type: 'bytes' },
267
- ],
268
- name: 'getAddressWithProof',
269
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
270
- },
271
- {
272
- stateMutability: 'pure',
273
- type: 'function',
274
- inputs: [
275
- {
276
- name: '_ethSignedMessageHash',
277
- internalType: 'bytes32',
278
- type: 'bytes32',
279
- },
280
- { name: '_signature', internalType: 'bytes', type: 'bytes' },
281
- ],
282
- name: 'recoverSigner',
283
- outputs: [{ name: '', internalType: 'address', type: 'address' }],
284
- },
285
- {
286
- stateMutability: 'pure',
287
- type: 'function',
288
- inputs: [{ name: 'sig', internalType: 'bytes', type: 'bytes' }],
289
- name: 'splitSignature',
290
- outputs: [
291
- { name: 'r', internalType: 'bytes32', type: 'bytes32' },
292
- { name: 's', internalType: 'bytes32', type: 'bytes32' },
293
- { name: 'v', internalType: 'uint8', type: 'uint8' },
294
- ],
295
- },
296
- {
297
- stateMutability: 'view',
298
- type: 'function',
299
- inputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
300
- name: 'urls',
301
- outputs: [{ name: '', internalType: 'string', type: 'string' }],
302
- },
303
- ];
304
- exports.payableABI = [
305
- {
306
- stateMutability: 'payable',
307
- type: 'function',
308
- inputs: [],
309
- name: 'pay',
310
- outputs: [],
311
- },
312
- ];
313
- //# sourceMappingURL=generated.js.map