@gitmyabi/uni-v2 1.0.114 → 1.0.116
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/README.md +4 -4
- package/contracts/{UniswapV2Pair_json.d.ts → UniswapV2Pair.d.ts} +23 -23
- package/contracts/{UniswapV2Pair_json.js → UniswapV2Pair.js} +16 -16
- package/contracts/{UniswapV2Pair_json.ts → UniswapV2Pair.ts} +30 -30
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated TypeScript type bindings for **UNI-V2**
|
|
4
4
|
|
|
5
|
-
- **Build ID**: `etherscan-uni-v2-
|
|
5
|
+
- **Build ID**: `etherscan-uni-v2-715906f0-1793895549183`
|
|
6
6
|
- **Build Number**: 1
|
|
7
|
-
- **Commit**: `
|
|
7
|
+
- **Commit**: `36e841c`
|
|
8
8
|
- **Branch**: `etherscan`
|
|
9
9
|
- **Target**: `ethers-v6`
|
|
10
10
|
- **Contracts**: 1
|
|
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **UNI-V2**
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @gitmyabi/uni-v2@1.0.
|
|
15
|
+
npm install @gitmyabi/uni-v2@1.0.116
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -105,4 +105,4 @@ This package includes type bindings for 1 contract(s) generated from ABI artifac
|
|
|
105
105
|
|
|
106
106
|
## License
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Apache License 2.0
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* UniswapV2Pair ABI
|
|
4
4
|
*
|
|
5
5
|
* This ABI is typed using viem's type system for full type safety.
|
|
6
6
|
*/
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const UniswapV2PairAbi: readonly [{
|
|
8
8
|
readonly inputs: readonly [];
|
|
9
9
|
readonly payable: false;
|
|
10
10
|
readonly stateMutability: "nonpayable";
|
|
@@ -570,15 +570,15 @@ export declare const UniswapV2Pair_jsonAbi: readonly [{
|
|
|
570
570
|
readonly type: "function";
|
|
571
571
|
}];
|
|
572
572
|
/**
|
|
573
|
-
* Type-safe ABI for
|
|
573
|
+
* Type-safe ABI for UniswapV2Pair
|
|
574
574
|
*/
|
|
575
|
-
export type
|
|
575
|
+
export type UniswapV2PairAbi = typeof UniswapV2PairAbi;
|
|
576
576
|
/**
|
|
577
|
-
* Contract instance type for
|
|
577
|
+
* Contract instance type for UniswapV2Pair
|
|
578
578
|
*/
|
|
579
|
-
export type
|
|
579
|
+
export type UniswapV2PairContract = any;
|
|
580
580
|
/**
|
|
581
|
-
*
|
|
581
|
+
* UniswapV2Pair Contract Class
|
|
582
582
|
*
|
|
583
583
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
584
584
|
*
|
|
@@ -586,12 +586,12 @@ export type UniswapV2Pair_jsonContract = any;
|
|
|
586
586
|
* ```typescript
|
|
587
587
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
588
588
|
* import { mainnet } from 'viem/chains';
|
|
589
|
-
* import {
|
|
589
|
+
* import { UniswapV2Pair } from 'UniswapV2Pair';
|
|
590
590
|
*
|
|
591
591
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
592
592
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
593
593
|
*
|
|
594
|
-
* const contract = new
|
|
594
|
+
* const contract = new UniswapV2Pair('0x...', { publicClient, walletClient });
|
|
595
595
|
*
|
|
596
596
|
* // Read functions
|
|
597
597
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -609,7 +609,7 @@ export type UniswapV2Pair_jsonContract = any;
|
|
|
609
609
|
* });
|
|
610
610
|
* ```
|
|
611
611
|
*/
|
|
612
|
-
export declare class
|
|
612
|
+
export declare class UniswapV2Pair {
|
|
613
613
|
private contract;
|
|
614
614
|
private contractAddress;
|
|
615
615
|
private publicClient;
|
|
@@ -622,9 +622,9 @@ export declare class UniswapV2Pair_json {
|
|
|
622
622
|
*/
|
|
623
623
|
get address(): Address;
|
|
624
624
|
/**
|
|
625
|
-
* Get the underlying viem contract instance
|
|
625
|
+
* Get the underlying viem contract instance.
|
|
626
626
|
*/
|
|
627
|
-
getContract():
|
|
627
|
+
getContract(): UniswapV2PairContract;
|
|
628
628
|
/**
|
|
629
629
|
* DOMAIN_SEPARATOR
|
|
630
630
|
* view
|
|
@@ -1084,8 +1084,8 @@ export declare class UniswapV2Pair_json {
|
|
|
1084
1084
|
spender: `0x${string}`;
|
|
1085
1085
|
value: bigint;
|
|
1086
1086
|
}) => void, filter?: {
|
|
1087
|
-
owner
|
|
1088
|
-
spender
|
|
1087
|
+
owner?: `0x${string}` | `0x${string}`[] | null;
|
|
1088
|
+
spender?: `0x${string}` | `0x${string}`[] | null;
|
|
1089
1089
|
}) => () => void;
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Watch Burn events
|
|
@@ -1095,12 +1095,12 @@ export declare class UniswapV2Pair_json {
|
|
|
1095
1095
|
*/
|
|
1096
1096
|
Burn: (callback: (event: {
|
|
1097
1097
|
sender: `0x${string}`;
|
|
1098
|
-
to: `0x${string}`;
|
|
1099
1098
|
amount0: bigint;
|
|
1100
1099
|
amount1: bigint;
|
|
1101
|
-
}) => void, filter?: {
|
|
1102
|
-
sender: `0x${string}`;
|
|
1103
1100
|
to: `0x${string}`;
|
|
1101
|
+
}) => void, filter?: {
|
|
1102
|
+
sender?: `0x${string}` | `0x${string}`[] | null;
|
|
1103
|
+
to?: `0x${string}` | `0x${string}`[] | null;
|
|
1104
1104
|
}) => () => void;
|
|
1105
1105
|
/**
|
|
1106
1106
|
* Watch Mint events
|
|
@@ -1113,7 +1113,7 @@ export declare class UniswapV2Pair_json {
|
|
|
1113
1113
|
amount0: bigint;
|
|
1114
1114
|
amount1: bigint;
|
|
1115
1115
|
}) => void, filter?: {
|
|
1116
|
-
sender
|
|
1116
|
+
sender?: `0x${string}` | `0x${string}`[] | null;
|
|
1117
1117
|
}) => () => void;
|
|
1118
1118
|
/**
|
|
1119
1119
|
* Watch Swap events
|
|
@@ -1123,14 +1123,14 @@ export declare class UniswapV2Pair_json {
|
|
|
1123
1123
|
*/
|
|
1124
1124
|
Swap: (callback: (event: {
|
|
1125
1125
|
sender: `0x${string}`;
|
|
1126
|
-
to: `0x${string}`;
|
|
1127
1126
|
amount0In: bigint;
|
|
1128
1127
|
amount1In: bigint;
|
|
1129
1128
|
amount0Out: bigint;
|
|
1130
1129
|
amount1Out: bigint;
|
|
1131
|
-
}) => void, filter?: {
|
|
1132
|
-
sender: `0x${string}`;
|
|
1133
1130
|
to: `0x${string}`;
|
|
1131
|
+
}) => void, filter?: {
|
|
1132
|
+
sender?: `0x${string}` | `0x${string}`[] | null;
|
|
1133
|
+
to?: `0x${string}` | `0x${string}`[] | null;
|
|
1134
1134
|
}) => () => void;
|
|
1135
1135
|
/**
|
|
1136
1136
|
* Watch Sync events
|
|
@@ -1153,8 +1153,8 @@ export declare class UniswapV2Pair_json {
|
|
|
1153
1153
|
to: `0x${string}`;
|
|
1154
1154
|
value: bigint;
|
|
1155
1155
|
}) => void, filter?: {
|
|
1156
|
-
from
|
|
1157
|
-
to
|
|
1156
|
+
from?: `0x${string}` | `0x${string}`[] | null;
|
|
1157
|
+
to?: `0x${string}` | `0x${string}`[] | null;
|
|
1158
1158
|
}) => () => void;
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UniswapV2Pair = exports.UniswapV2PairAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* UniswapV2Pair ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.UniswapV2PairAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [],
|
|
13
13
|
"payable": false,
|
|
@@ -721,7 +721,7 @@ exports.UniswapV2Pair_jsonAbi = [
|
|
|
721
721
|
}
|
|
722
722
|
];
|
|
723
723
|
/**
|
|
724
|
-
*
|
|
724
|
+
* UniswapV2Pair Contract Class
|
|
725
725
|
*
|
|
726
726
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
727
727
|
*
|
|
@@ -729,12 +729,12 @@ exports.UniswapV2Pair_jsonAbi = [
|
|
|
729
729
|
* ```typescript
|
|
730
730
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
731
731
|
* import { mainnet } from 'viem/chains';
|
|
732
|
-
* import {
|
|
732
|
+
* import { UniswapV2Pair } from 'UniswapV2Pair';
|
|
733
733
|
*
|
|
734
734
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
735
735
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
736
736
|
*
|
|
737
|
-
* const contract = new
|
|
737
|
+
* const contract = new UniswapV2Pair('0x...', { publicClient, walletClient });
|
|
738
738
|
*
|
|
739
739
|
* // Read functions
|
|
740
740
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -752,13 +752,13 @@ exports.UniswapV2Pair_jsonAbi = [
|
|
|
752
752
|
* });
|
|
753
753
|
* ```
|
|
754
754
|
*/
|
|
755
|
-
class
|
|
755
|
+
class UniswapV2Pair {
|
|
756
756
|
constructor(address, clients) {
|
|
757
757
|
this.contractAddress = address;
|
|
758
758
|
this.publicClient = clients.publicClient;
|
|
759
759
|
this.contract = (0, viem_1.getContract)({
|
|
760
760
|
address,
|
|
761
|
-
abi: exports.
|
|
761
|
+
abi: exports.UniswapV2PairAbi,
|
|
762
762
|
client: {
|
|
763
763
|
public: clients.publicClient,
|
|
764
764
|
wallet: clients.walletClient,
|
|
@@ -772,7 +772,7 @@ class UniswapV2Pair_json {
|
|
|
772
772
|
return this.contractAddress;
|
|
773
773
|
}
|
|
774
774
|
/**
|
|
775
|
-
* Get the underlying viem contract instance
|
|
775
|
+
* Get the underlying viem contract instance.
|
|
776
776
|
*/
|
|
777
777
|
getContract() {
|
|
778
778
|
return this.contract;
|
|
@@ -1125,7 +1125,7 @@ class UniswapV2Pair_json {
|
|
|
1125
1125
|
Approval: (callback, filter) => {
|
|
1126
1126
|
return this.publicClient.watchContractEvent({
|
|
1127
1127
|
address: this.contractAddress,
|
|
1128
|
-
abi: exports.
|
|
1128
|
+
abi: exports.UniswapV2PairAbi,
|
|
1129
1129
|
eventName: 'Approval',
|
|
1130
1130
|
args: filter,
|
|
1131
1131
|
onLogs: (logs) => {
|
|
@@ -1144,7 +1144,7 @@ class UniswapV2Pair_json {
|
|
|
1144
1144
|
Burn: (callback, filter) => {
|
|
1145
1145
|
return this.publicClient.watchContractEvent({
|
|
1146
1146
|
address: this.contractAddress,
|
|
1147
|
-
abi: exports.
|
|
1147
|
+
abi: exports.UniswapV2PairAbi,
|
|
1148
1148
|
eventName: 'Burn',
|
|
1149
1149
|
args: filter,
|
|
1150
1150
|
onLogs: (logs) => {
|
|
@@ -1163,7 +1163,7 @@ class UniswapV2Pair_json {
|
|
|
1163
1163
|
Mint: (callback, filter) => {
|
|
1164
1164
|
return this.publicClient.watchContractEvent({
|
|
1165
1165
|
address: this.contractAddress,
|
|
1166
|
-
abi: exports.
|
|
1166
|
+
abi: exports.UniswapV2PairAbi,
|
|
1167
1167
|
eventName: 'Mint',
|
|
1168
1168
|
args: filter,
|
|
1169
1169
|
onLogs: (logs) => {
|
|
@@ -1182,7 +1182,7 @@ class UniswapV2Pair_json {
|
|
|
1182
1182
|
Swap: (callback, filter) => {
|
|
1183
1183
|
return this.publicClient.watchContractEvent({
|
|
1184
1184
|
address: this.contractAddress,
|
|
1185
|
-
abi: exports.
|
|
1185
|
+
abi: exports.UniswapV2PairAbi,
|
|
1186
1186
|
eventName: 'Swap',
|
|
1187
1187
|
args: filter,
|
|
1188
1188
|
onLogs: (logs) => {
|
|
@@ -1201,7 +1201,7 @@ class UniswapV2Pair_json {
|
|
|
1201
1201
|
Sync: (callback) => {
|
|
1202
1202
|
return this.publicClient.watchContractEvent({
|
|
1203
1203
|
address: this.contractAddress,
|
|
1204
|
-
abi: exports.
|
|
1204
|
+
abi: exports.UniswapV2PairAbi,
|
|
1205
1205
|
eventName: 'Sync',
|
|
1206
1206
|
onLogs: (logs) => {
|
|
1207
1207
|
logs.forEach((log) => {
|
|
@@ -1219,7 +1219,7 @@ class UniswapV2Pair_json {
|
|
|
1219
1219
|
Transfer: (callback, filter) => {
|
|
1220
1220
|
return this.publicClient.watchContractEvent({
|
|
1221
1221
|
address: this.contractAddress,
|
|
1222
|
-
abi: exports.
|
|
1222
|
+
abi: exports.UniswapV2PairAbi,
|
|
1223
1223
|
eventName: 'Transfer',
|
|
1224
1224
|
args: filter,
|
|
1225
1225
|
onLogs: (logs) => {
|
|
@@ -1232,4 +1232,4 @@ class UniswapV2Pair_json {
|
|
|
1232
1232
|
};
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
exports.
|
|
1235
|
+
exports.UniswapV2Pair = UniswapV2Pair;
|
|
@@ -2,11 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* UniswapV2Pair ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const UniswapV2PairAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [],
|
|
12
12
|
"payable": false,
|
|
@@ -721,19 +721,19 @@ export const UniswapV2Pair_jsonAbi = [
|
|
|
721
721
|
] as const satisfies Abi;
|
|
722
722
|
|
|
723
723
|
/**
|
|
724
|
-
* Type-safe ABI for
|
|
724
|
+
* Type-safe ABI for UniswapV2Pair
|
|
725
725
|
*/
|
|
726
|
-
export type
|
|
726
|
+
export type UniswapV2PairAbi = typeof UniswapV2PairAbi;
|
|
727
727
|
|
|
728
728
|
/**
|
|
729
|
-
* Contract instance type for
|
|
729
|
+
* Contract instance type for UniswapV2Pair
|
|
730
730
|
*/
|
|
731
731
|
// Use any for contract type to avoid complex viem type issues
|
|
732
732
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
733
|
-
export type
|
|
733
|
+
export type UniswapV2PairContract = any;
|
|
734
734
|
|
|
735
735
|
/**
|
|
736
|
-
*
|
|
736
|
+
* UniswapV2Pair Contract Class
|
|
737
737
|
*
|
|
738
738
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
739
739
|
*
|
|
@@ -741,12 +741,12 @@ export type UniswapV2Pair_jsonContract = any;
|
|
|
741
741
|
* ```typescript
|
|
742
742
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
743
743
|
* import { mainnet } from 'viem/chains';
|
|
744
|
-
* import {
|
|
744
|
+
* import { UniswapV2Pair } from 'UniswapV2Pair';
|
|
745
745
|
*
|
|
746
746
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
747
747
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
748
748
|
*
|
|
749
|
-
* const contract = new
|
|
749
|
+
* const contract = new UniswapV2Pair('0x...', { publicClient, walletClient });
|
|
750
750
|
*
|
|
751
751
|
* // Read functions
|
|
752
752
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -764,8 +764,8 @@ export type UniswapV2Pair_jsonContract = any;
|
|
|
764
764
|
* });
|
|
765
765
|
* ```
|
|
766
766
|
*/
|
|
767
|
-
export class
|
|
768
|
-
private contract:
|
|
767
|
+
export class UniswapV2Pair {
|
|
768
|
+
private contract: UniswapV2PairContract;
|
|
769
769
|
private contractAddress: Address;
|
|
770
770
|
private publicClient: PublicClient;
|
|
771
771
|
|
|
@@ -780,7 +780,7 @@ export class UniswapV2Pair_json {
|
|
|
780
780
|
this.publicClient = clients.publicClient;
|
|
781
781
|
this.contract = getContract({
|
|
782
782
|
address,
|
|
783
|
-
abi:
|
|
783
|
+
abi: UniswapV2PairAbi,
|
|
784
784
|
client: {
|
|
785
785
|
public: clients.publicClient,
|
|
786
786
|
wallet: clients.walletClient,
|
|
@@ -796,9 +796,9 @@ export class UniswapV2Pair_json {
|
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
/**
|
|
799
|
-
* Get the underlying viem contract instance
|
|
799
|
+
* Get the underlying viem contract instance.
|
|
800
800
|
*/
|
|
801
|
-
getContract():
|
|
801
|
+
getContract(): UniswapV2PairContract {
|
|
802
802
|
return this.contract;
|
|
803
803
|
}
|
|
804
804
|
|
|
@@ -1397,12 +1397,12 @@ export class UniswapV2Pair_json {
|
|
|
1397
1397
|
* @param filter Optional filter for indexed parameters
|
|
1398
1398
|
* @returns Unwatch function to stop listening
|
|
1399
1399
|
*/
|
|
1400
|
-
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner
|
|
1400
|
+
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1401
1401
|
return this.publicClient.watchContractEvent({
|
|
1402
1402
|
address: this.contractAddress,
|
|
1403
|
-
abi:
|
|
1403
|
+
abi: UniswapV2PairAbi,
|
|
1404
1404
|
eventName: 'Approval',
|
|
1405
|
-
args: filter,
|
|
1405
|
+
args: filter as any,
|
|
1406
1406
|
onLogs: (logs: any[]) => {
|
|
1407
1407
|
logs.forEach((log: any) => {
|
|
1408
1408
|
callback(log.args as any);
|
|
@@ -1416,12 +1416,12 @@ export class UniswapV2Pair_json {
|
|
|
1416
1416
|
* @param filter Optional filter for indexed parameters
|
|
1417
1417
|
* @returns Unwatch function to stop listening
|
|
1418
1418
|
*/
|
|
1419
|
-
Burn: (callback: (event: { sender: `0x${string}`;
|
|
1419
|
+
Burn: (callback: (event: { sender: `0x${string}`; amount0: bigint; amount1: bigint; to: `0x${string}` }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1420
1420
|
return this.publicClient.watchContractEvent({
|
|
1421
1421
|
address: this.contractAddress,
|
|
1422
|
-
abi:
|
|
1422
|
+
abi: UniswapV2PairAbi,
|
|
1423
1423
|
eventName: 'Burn',
|
|
1424
|
-
args: filter,
|
|
1424
|
+
args: filter as any,
|
|
1425
1425
|
onLogs: (logs: any[]) => {
|
|
1426
1426
|
logs.forEach((log: any) => {
|
|
1427
1427
|
callback(log.args as any);
|
|
@@ -1435,12 +1435,12 @@ export class UniswapV2Pair_json {
|
|
|
1435
1435
|
* @param filter Optional filter for indexed parameters
|
|
1436
1436
|
* @returns Unwatch function to stop listening
|
|
1437
1437
|
*/
|
|
1438
|
-
Mint: (callback: (event: { sender: `0x${string}`; amount0: bigint; amount1: bigint }) => void, filter?: { sender
|
|
1438
|
+
Mint: (callback: (event: { sender: `0x${string}`; amount0: bigint; amount1: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1439
1439
|
return this.publicClient.watchContractEvent({
|
|
1440
1440
|
address: this.contractAddress,
|
|
1441
|
-
abi:
|
|
1441
|
+
abi: UniswapV2PairAbi,
|
|
1442
1442
|
eventName: 'Mint',
|
|
1443
|
-
args: filter,
|
|
1443
|
+
args: filter as any,
|
|
1444
1444
|
onLogs: (logs: any[]) => {
|
|
1445
1445
|
logs.forEach((log: any) => {
|
|
1446
1446
|
callback(log.args as any);
|
|
@@ -1454,12 +1454,12 @@ export class UniswapV2Pair_json {
|
|
|
1454
1454
|
* @param filter Optional filter for indexed parameters
|
|
1455
1455
|
* @returns Unwatch function to stop listening
|
|
1456
1456
|
*/
|
|
1457
|
-
Swap: (callback: (event: { sender: `0x${string}`;
|
|
1457
|
+
Swap: (callback: (event: { sender: `0x${string}`; amount0In: bigint; amount1In: bigint; amount0Out: bigint; amount1Out: bigint; to: `0x${string}` }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1458
1458
|
return this.publicClient.watchContractEvent({
|
|
1459
1459
|
address: this.contractAddress,
|
|
1460
|
-
abi:
|
|
1460
|
+
abi: UniswapV2PairAbi,
|
|
1461
1461
|
eventName: 'Swap',
|
|
1462
|
-
args: filter,
|
|
1462
|
+
args: filter as any,
|
|
1463
1463
|
onLogs: (logs: any[]) => {
|
|
1464
1464
|
logs.forEach((log: any) => {
|
|
1465
1465
|
callback(log.args as any);
|
|
@@ -1476,7 +1476,7 @@ export class UniswapV2Pair_json {
|
|
|
1476
1476
|
Sync: (callback: (event: { reserve0: bigint; reserve1: bigint }) => void) => {
|
|
1477
1477
|
return this.publicClient.watchContractEvent({
|
|
1478
1478
|
address: this.contractAddress,
|
|
1479
|
-
abi:
|
|
1479
|
+
abi: UniswapV2PairAbi,
|
|
1480
1480
|
eventName: 'Sync',
|
|
1481
1481
|
|
|
1482
1482
|
onLogs: (logs: any[]) => {
|
|
@@ -1492,12 +1492,12 @@ export class UniswapV2Pair_json {
|
|
|
1492
1492
|
* @param filter Optional filter for indexed parameters
|
|
1493
1493
|
* @returns Unwatch function to stop listening
|
|
1494
1494
|
*/
|
|
1495
|
-
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from
|
|
1495
|
+
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
1496
1496
|
return this.publicClient.watchContractEvent({
|
|
1497
1497
|
address: this.contractAddress,
|
|
1498
|
-
abi:
|
|
1498
|
+
abi: UniswapV2PairAbi,
|
|
1499
1499
|
eventName: 'Transfer',
|
|
1500
|
-
args: filter,
|
|
1500
|
+
args: filter as any,
|
|
1501
1501
|
onLogs: (logs: any[]) => {
|
|
1502
1502
|
logs.forEach((log: any) => {
|
|
1503
1503
|
callback(log.args as any);
|
package/contracts/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
1
|
+
export { UniswapV2PairAbi, UniswapV2Pair } from './UniswapV2Pair';
|
|
2
|
+
export type { UniswapV2PairAbi as UniswapV2PairAbiType, UniswapV2PairContract } from './UniswapV2Pair';
|
package/contracts/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UniswapV2Pair = exports.UniswapV2PairAbi = void 0;
|
|
4
4
|
// Auto-generated exports for all contracts
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(exports, "
|
|
7
|
-
Object.defineProperty(exports, "
|
|
5
|
+
var UniswapV2Pair_1 = require("./UniswapV2Pair");
|
|
6
|
+
Object.defineProperty(exports, "UniswapV2PairAbi", { enumerable: true, get: function () { return UniswapV2Pair_1.UniswapV2PairAbi; } });
|
|
7
|
+
Object.defineProperty(exports, "UniswapV2Pair", { enumerable: true, get: function () { return UniswapV2Pair_1.UniswapV2Pair; } });
|
package/contracts/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Auto-generated exports for all contracts
|
|
2
|
-
export {
|
|
3
|
-
export type {
|
|
2
|
+
export { UniswapV2PairAbi, UniswapV2Pair } from './UniswapV2Pair';
|
|
3
|
+
export type { UniswapV2PairAbi as UniswapV2PairAbiType, UniswapV2PairContract } from './UniswapV2Pair';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/uni-v2",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto-generated TypeScript type bindings for UNI-V2 (build etherscan-uni-v2-
|
|
3
|
+
"version": "1.0.116",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for UNI-V2 (build etherscan-uni-v2-715906f0-1793895549183, commit 36e841c, branch etherscan)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"abi",
|
|
31
31
|
"ethers-v6"
|
|
32
32
|
],
|
|
33
|
-
"license": "
|
|
33
|
+
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"viem": "^2.0.0"
|
|
36
36
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/etherscan/uni-v2"
|
|
40
40
|
},
|
|
41
41
|
"branch": "etherscan",
|
|
42
|
-
"shortHash": "
|
|
42
|
+
"shortHash": "36e841c"
|
|
43
43
|
}
|